- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for isIP (0.12 sec)
-
staging/src/k8s.io/apiserver/pkg/cel/library/ip.go
// isIP('::1') // returns true // isIP('127.0.0.256') // returns false // isIP(':::1') // returns false // // ip.isCanonical // // Returns true if the IP address is in its canonical form. // There is exactly one canonical form for every IP address, so fields containing // IPs in canonical form can just be treated as strings when checking for equality or uniqueness. // // ip.isCanonical(<string>) <bool> // // Examples: //
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 11:02:34 UTC 2023 - 9.8K bytes - Viewed (0) -
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) -
pkg/apis/networking/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 Feb 07 14:48:01 UTC 2024 - 31.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/library/cost.go
// in length. regexCost := uint64(math.Ceil(float64(actualSize(args[1])) * common.RegexStringLengthCostFactor)) cost := strCost * regexCost return &cost } case "cidr", "isIP", "isCIDR": // IP and CIDR parsing is a string traversal. if len(args) >= 1 { cost := uint64(math.Ceil(float64(actualSize(args[0])) * common.StringTraversalCostFactor)) return &cost } case "ip":
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 23 17:22:44 UTC 2024 - 20.6K 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)