all: apply go fix

Updates #cleanup

Signed-off-by: Adriano Sela Aviles <adriano@tailscale.com>
This commit is contained in:
Adriano Sela Aviles
2026-07-10 17:39:16 -07:00
committed by Adriano Sela Aviles
parent a5102d3fcb
commit d69bf2685a
26 changed files with 44 additions and 95 deletions
+1 -1
View File
@@ -2469,7 +2469,7 @@ type Oauth2Token struct {
// If zero, TokenSource implementations will reuse the same
// token forever and RefreshToken or equivalent
// mechanisms for that TokenSource will not be used.
Expiry time.Time `json:"expiry,omitempty"`
Expiry time.Time `json:"expiry,omitzero"`
}
// NodeCapability represents a capability granted to the self node as listed in
+2 -2
View File
@@ -808,7 +808,7 @@ func FuzzNodeIsRouter(f *testing.F) {
decodePrefixes := func(t *testing.T, prefixes string) []netip.Prefix {
t.Helper()
var out []netip.Prefix
for _, p := range strings.Fields(prefixes) {
for p := range strings.FieldsSeq(prefixes) {
pfx, err := netip.ParsePrefix(p)
if err != nil {
log.Printf("skipping %q: %v", prefixes, err)
@@ -1076,7 +1076,7 @@ func TestMarshalToRawMessageAndBack(t *testing.T) {
Ports []int `json:"ports,omitempty"`
ToggleOn bool `json:"toggleOn,omitempty"`
Name string `json:"name,omitempty"`
Groups inner `json:"groups,omitempty"`
Groups inner `json:"groups"`
Addrs []netip.AddrPort `json:"addrs"`
}
tests := []struct {