func normalizeHost(scheme, hostSpec string) string {
	standardPorts := map[string]string{
		"http":  "80",
		"https": "443",
	}
	hostParts := strings.Split(hostSpec, ":")
	if len(hostParts) == 2 && hostParts[1] == standardPorts[scheme] {
		// There's a port, but it's the default one.  Leave it out.
		return hostParts[0]
	}
	return hostSpec
}
// Remove the standard ports from the URL.
Remove the standard ports from the URL.
// Remove the standard ports from the URL .
func normalizeHost(scheme, hostSpec string) string {
	standardPorts := map[string]string{
		"http":  "80",
		"https": "443",
	}
	hostParts := strings.Split(hostSpec, ":")
	if len(hostParts) == 2 && hostParts[1] == standardPorts[scheme] {
		return hostParts[0]
	}
	return hostSpec
}
func normalizeHost ( scheme , hostSpec string ) string { standardPorts := map [ string ] string { " " : " " , " " : " " , } hostParts := strings . Split ( hostSpec , " " ) if len ( hostParts ) == 2 && hostParts [ 1 ] == standardPorts [ scheme ] { return hostParts [ 0 ] } return hostSpec }
Remove the standard ports from the URL.
Remove the standard ports from the URL .
// There's a port, but it's the default one.  Leave it out.