MCPcopy Create free account
hub / github.com/Pallinder/go-randomdata / IpV6Address

Function IpV6Address

random_data.go:348–355  ·  view source on GitHub ↗

IpV6Address returns a valid IPv6 address as net.IP

()

Source from the content-addressed store, hash-verified

346
347// IpV6Address returns a valid IPv6 address as net.IP
348func IpV6Address() string {
349 var ip net.IP
350 for i := 0; i < net.IPv6len; i++ {
351 number := uint8(privateRand.Intn(255))
352 ip = append(ip, number)
353 }
354 return ip.String()
355}
356
357// MacAddress returns an mac address string
358func MacAddress() string {

Callers 2

TestIpV6AddressFunction · 0.85
ExampleRandomdataFunction · 0.85

Calls 1

IntnMethod · 0.80

Tested by 2

TestIpV6AddressFunction · 0.68
ExampleRandomdataFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…