- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for isIP (0.03 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)