func canonicalAddr(url *url.URL) string {
	addr := url.Host
	if !hasPort(addr) {
		if strings.HasPrefix(addr, "[") && strings.HasSuffix(addr, "]") {
			addr = addr[1 : len(addr)-1]
		}
		return net.JoinHostPort(addr, portMap[url.Scheme])
	}
	return addr
}
// canonicalAddr returns url.Host but always with a ":port" suffix
canonicalAddr returns url.Host but always with a ":port" suffix
// canonicalAddr returns url . Host but always with a " : port " suffix
func canonicalAddr(url *url.URL) string {
	addr := url.Host
	if !hasPort(addr) {
		if strings.HasPrefix(addr, "[") && strings.HasSuffix(addr, "]") {
			addr = addr[1 : len(addr)-1]
		}
		return net.JoinHostPort(addr, portMap[url.Scheme])
	}
	return addr
}
func canonicalAddr ( url * url . URL ) string { addr := url . Host if ! hasPort ( addr ) { if strings . HasPrefix ( addr , " " ) && strings . HasSuffix ( addr , " " ) { addr = addr [ 1 : len ( addr ) - 1 ] } return net . JoinHostPort ( addr , portMap [ url . Scheme ] ) } return addr }
canonicalAddr returns url.Host but always with a ":port" suffix
canonicalAddr returns url . Host but always with a " : port " suffix