cmd: 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 14:26:11 -07:00
committed by Adriano Sela Aviles
parent 2b62cb54a7
commit 66a51c426f
7 changed files with 12 additions and 23 deletions
+1 -4
View File
@@ -41,10 +41,7 @@ func Test_statefulSetNameBase(t *testing.T) {
if _, err := b.WriteString("a"); err != nil {
t.Fatalf("error writing to string builder: %v", err)
}
baseLength := b.Len()
if baseLength > 43 {
baseLength = 43 // currently 43 is the max base length
}
baseLength := min(b.Len(), 43) // currently 43 is the max base length
wantsNameR := regexp.MustCompile(`^ts-a{` + fmt.Sprint(baseLength) + `}-$`) // to match a string like ts-aaaa-
gotName := statefulSetNameBase(b.String())
if !wantsNameR.MatchString(gotName) {