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

Function toNetipAddrSlice

cli/command/container/opts.go:1142–1155  ·  view source on GitHub ↗
(ips []string)

Source from the content-addressed store, hash-verified

1140}
1141
1142func toNetipAddrSlice(ips []string) []netip.Addr {
1143 if len(ips) == 0 {
1144 return nil
1145 }
1146 netIPs := make([]netip.Addr, 0, len(ips))
1147 for _, ip := range ips {
1148 addr, err := netip.ParseAddr(ip)
1149 if err != nil {
1150 continue
1151 }
1152 netIPs = append(netIPs, addr)
1153 }
1154 return netIPs
1155}

Callers 2

parseFunction · 0.70
applyContainerOptionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…