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

Function toNetipAddrSlice

cli/command/network/connect.go:102–111  ·  view source on GitHub ↗
(ips []net.IP)

Source from the content-addressed store, hash-verified

100}
101
102func toNetipAddrSlice(ips []net.IP) []netip.Addr {
103 if len(ips) == 0 {
104 return nil
105 }
106 netIPs := make([]netip.Addr, 0, len(ips))
107 for _, ip := range ips {
108 netIPs = append(netIPs, toNetipAddr(ip))
109 }
110 return netIPs
111}
112
113func toNetipAddr(ip net.IP) netip.Addr {
114 a, _ := netip.AddrFromSlice(ip)

Callers 1

runConnectFunction · 0.70

Calls 1

toNetipAddrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…