matchers.go
func getHost(r *http.Request) string {
	if r.URL.IsAbs() {
		host := r.Host
		// Slice off any port information.
		if i := strings.Index(host, ":"); i != -1 {
			host = host[:i]
		}
		return host
	}
	return r.URL.Host
}
func getHost(r *http.Request) string {
	if r.URL.IsAbs() {
		host := r.Host
		// Slice off any port information.
		if i := strings.Index(host, ":"); i != -1 {
			host = host[:i]
		}
		return host
	}
	return r.URL.Host
}
func getHost ( r * http . Request ) string { if r . URL . IsAbs ( ) { host := r . Host // Slice off any port information. if i := strings . Index ( host , " " ) ; i != - 1 { host = host [ : i ] } return host } return r . URL . Host }
// Helpers --------------------------------------------------------------------
// getHost tries its best to return the request host.
Helpers -------------------------------------------------------------------- getHost tries its best to return the request host .