MCPcopy Create free account
hub / github.com/docker/cli / toNetipAddrSlice

Function toNetipAddrSlice

cli/compose/convert/service.go:668–681  ·  view source on GitHub ↗
(ips []string)

Source from the content-addressed store, hash-verified

666}
667
668func toNetipAddrSlice(ips []string) []netip.Addr {
669 if len(ips) == 0 {
670 return nil
671 }
672 netIPs := make([]netip.Addr, 0, len(ips))
673 for _, ip := range ips {
674 addr, err := netip.ParseAddr(ip)
675 if err != nil {
676 continue
677 }
678 netIPs = append(netIPs, addr)
679 }
680 return netIPs
681}
682
683func convertCredentialSpec(namespace Namespace, spec composetypes.CredentialSpecConfig, refs []*swarm.ConfigReference) (*swarm.CredentialSpec, error) {
684 var o []string

Callers 3

TestConvertDNSConfigAllFunction · 0.70
convertDNSConfigFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestConvertDNSConfigAllFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…