mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-05 04:11:59 +00:00
all: remove LenIter, use Go 1.22 range-over-int instead
Updates #11058 Updates golang/go#65685 Change-Id: Ibb216b346e511d486271ab3d84e4546c521e4e22 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
ff1391a97e
commit
e1bd7488d0
@@ -1366,7 +1366,7 @@ func (de *endpoint) updateFromNode(n tailcfg.NodeView, heartbeatDisabled bool, p
|
||||
}
|
||||
|
||||
func (de *endpoint) setEndpointsLocked(eps interface {
|
||||
LenIter() []struct{}
|
||||
Len() int
|
||||
At(i int) netip.AddrPort
|
||||
}) {
|
||||
for _, st := range de.endpointState {
|
||||
@@ -1374,7 +1374,7 @@ func (de *endpoint) setEndpointsLocked(eps interface {
|
||||
}
|
||||
|
||||
var newIpps []netip.AddrPort
|
||||
for i := range eps.LenIter() {
|
||||
for i := range eps.Len() {
|
||||
if i > math.MaxInt16 {
|
||||
// Seems unlikely.
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user