all: apply go fix
Updates #cleanup Signed-off-by: Adriano Sela Aviles <adriano@tailscale.com>
This commit is contained in:
committed by
Adriano Sela Aviles
parent
a5102d3fcb
commit
d69bf2685a
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user