code: func authorityAddr(scheme string, authority string) (addr string) {
  	host, port, err := net.SplitHostPort(authority)
  	if err != nil { // authority didn't have a port
  		port = "443"
  		if scheme == "http" {
  			port = "80"
  		}
  		host = authority
  	}
  	if a, err := idna.ToASCII(host); err == nil {
  		host = a
  	}
  	// IPv6 address literal, without a port:
  	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
  		return host + ":" + port
  	}
  	return net.JoinHostPort(host, port)
  }
docs: // authorityAddr returns a given authority (a host/IP, or host:port / ip:port)
  // and returns a host:port. The port 443 is added if needed.