- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for isIP (0.08 sec)
-
src/net/http/cookiejar/jar.go
// returns "com" as the jar key is generated from host. } prevDot := strings.LastIndex(host[:i-1], ".") return host[prevDot+1:] } // isIP reports whether host is an IP address. func isIP(host string) bool { if strings.ContainsAny(host, ":%") { // Probable IPv6 address. // Hostnames can't contain : or %, so this is definitely not a valid host.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 15K bytes - Viewed (0) -
src/net/http/cookiejar/jar_test.go
"1.1.1.300": false, "www.foo.bar.net": false, "123.foo.bar.net": false, } func TestIsIP(t *testing.T) { for host, want := range isIPTests { if got := isIP(host); got != want { t.Errorf("%q: got %t, want %t", host, got, want) } } } var defaultPathTests = map[string]string{ "/": "/", "/abc": "/", "/abc/": "/abc",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 34K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go
}, expectedCost: 7, }, {name: "IP and CIDR", obj: objs("20", "200M"), schema: schemas(stringType, stringType), valid: []string{ `isIP("192.168.0.1")`, `ip.isCanonical("127.0.0.1")`, `ip("192.168.0.1").family() > 0`, `ip("0.0.0.0").isUnspecified()`, `ip("127.0.0.1").isLoopback()`, `ip("224.0.0.1").isLinkLocalMulticast()`,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 17:14:10 UTC 2024 - 159.9K bytes - Viewed (0) -
pkg/apis/core/validation/validation.go
for _, msg := range validation.IsDNS1123Subdomain(ingress.Hostname) { allErrs = append(allErrs, field.Invalid(idxPath.Child("hostname"), ingress.Hostname, msg)) } if isIP := (netutils.ParseIPSloppy(ingress.Hostname) != nil); isIP { allErrs = append(allErrs, field.Invalid(idxPath.Child("hostname"), ingress.Hostname, "must be a DNS name, not an IP address")) } } } } return allErrs }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 349.5K bytes - Viewed (0)