MCPcopy Index your code
hub / github.com/docker/cli / toNetipAddr

Function toNetipAddr

cli/command/network/connect.go:113–116  ·  view source on GitHub ↗
(ip net.IP)

Source from the content-addressed store, hash-verified

111}
112
113func toNetipAddr(ip net.IP) netip.Addr {
114 a, _ := netip.AddrFromSlice(ip)
115 return a.Unmap()
116}
117
118// toPrefix converts n into a netip.Prefix. If n is not a valid IPv4 or IPV6
119// address, ToPrefix returns netip.Prefix{}, false.

Callers 3

runConnectFunction · 0.85
toNetipAddrSliceFunction · 0.85
createIPAMConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…