MCPcopy Create free account
hub / github.com/imroc/req / getHostname

Function getHostname

redirect.go:94–100  ·  view source on GitHub ↗
(host string)

Source from the content-addressed store, hash-verified

92}
93
94func getHostname(host string) (hostname string) {
95 if strings.Index(host, ":") > 0 {
96 host, _, _ = net.SplitHostPort(host)
97 }
98 hostname = strings.ToLower(host)
99 return
100}
101
102func getDomain(host string) string {
103 host = getHostname(host)

Callers 3

SameHostRedirectPolicyFunction · 0.85
getDomainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…