mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-25 02:02:51 +00:00
all: use Go 1.22 range-over-int
Updates #11058 Change-Id: I35e7ef9b90e83cac04ca93fd964ad00ed5b48430 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
068db1f972
commit
7c1d6e35a5
@@ -265,7 +265,7 @@ func configureInterface(cfg *Config, tun *tun.NativeTun) (retErr error) {
|
||||
// new interface has come up. Poll periodically until it
|
||||
// does.
|
||||
const tries = 20
|
||||
for i := 0; i < tries; i++ {
|
||||
for i := range tries {
|
||||
found, err := setPrivateNetwork(luid)
|
||||
if err != nil {
|
||||
networkCategoryWarning.Set(fmt.Errorf("set-network-category: %w", err))
|
||||
@@ -398,7 +398,7 @@ func configureInterface(cfg *Config, tun *tun.NativeTun) (retErr error) {
|
||||
slices.SortFunc(routes, (*routeData).Compare)
|
||||
|
||||
deduplicatedRoutes := []*routeData{}
|
||||
for i := 0; i < len(routes); i++ {
|
||||
for i := range len(routes) {
|
||||
// There's only one way to get to a given IP+Mask, so delete
|
||||
// all matches after the first.
|
||||
if i > 0 && routes[i].Destination == routes[i-1].Destination {
|
||||
|
||||
Reference in New Issue
Block a user