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
+4 -4
View File
@@ -428,11 +428,11 @@ func waitForVMIP(t testing.TB, mac string, timeout time.Duration) (string, error
var currentIP string
for _, line := range lines {
line = strings.TrimSpace(line)
if strings.HasPrefix(line, "ip_address=") {
currentIP = strings.TrimPrefix(line, "ip_address=")
if after, ok := strings.CutPrefix(line, "ip_address="); ok {
currentIP = after
}
if strings.HasPrefix(line, "hw_address=") {
hw := strings.TrimPrefix(line, "hw_address=")
if after, ok := strings.CutPrefix(line, "hw_address="); ok {
hw := after
if strings.ToLower(hw) == leaseMAC && currentIP != "" {
return currentIP, nil
}