MCPcopy Create free account
hub / github.com/ddev/ddev / IsIPAddress

Function IsIPAddress

pkg/nodeps/utils.go:143–148  ·  view source on GitHub ↗

IsIPAddress returns true if ip is ipv4 or ipv6 address

(ip string)

Source from the content-addressed store, hash-verified

141
142// IsIPAddress returns true if ip is ipv4 or ipv6 address
143func IsIPAddress(ip string) bool {
144 if net.ParseIP(ip) != nil {
145 return true
146 }
147 return false
148}
149
150// GrepStringInBuffer finds strings that match needle
151func GrepStringInBuffer(buffer string, needle string) []string {

Callers 3

IsValidXdebugIDELocationFunction · 0.92
TestIsIPAddressFunction · 0.92
GetHostDockerInternalFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestIsIPAddressFunction · 0.74