MCPcopy Index your code
hub / github.com/coder/coder / isLoopbackOrUnspecified

Function isLoopbackOrUnspecified

agent/agentcontainers/containers_dockercli.go:523–529  ·  view source on GitHub ↗

convenience function to check if an IP address is loopback or unspecified

(ips string)

Source from the content-addressed store, hash-verified

521
522// convenience function to check if an IP address is loopback or unspecified
523func isLoopbackOrUnspecified(ips string) bool {
524 nip := net.ParseIP(ips)
525 if nip == nil {
526 return false // technically correct, I suppose
527 }
528 return nip.IsLoopback() || nip.IsUnspecified()
529}
530
531// DetectArchitecture detects the architecture of a container by inspecting its
532// image.

Callers 1

convertDockerInspectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected