We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eff2f58 commit 6220f46Copy full SHA for 6220f46
1 file changed
ci/test.go
@@ -361,6 +361,13 @@ func getIPFromCIDR(cidr string) (string, error) {
361
}
362
363
// For IPv6, we can usually just use the network address.
364
+ if ipv6 := ip.To16(); ipv6 != nil {
365
+ parts := make([]string, 8)
366
+ for i := 0; i < 8; i++ {
367
+ parts[i] = fmt.Sprintf("%04x", uint16(ipv6[i*2])<<8|uint16(ipv6[i*2+1]))
368
+ }
369
+ return strings.Join(parts, ":"), nil
370
371
return ip.String(), nil
372
373
0 commit comments