code: func normalizePortPortion(s string) (string, error) {
  	if s == "" {
  		return s, nil
  	}
  
  	if s[0] != ':' {
  		// should never happen, since caller tends to guarantee the presence
  		// of a colon due to how it's extracted from the string.
  		return s, errors.New("port portion is missing its initial colon")
  	}
  
  	numStr := s[1:]
  	num, err := strconv.Atoi(numStr)
  	if err != nil {
  		return s, errors.New("port portion contains non-digit characters")
  	}
  	if num == 443 {
  		return "", nil // ":443" is the default
  	}
  	if num > 65535 {
  		return s, errors.New("port number is greater than 65535")
  	}
  	return fmt.Sprintf(":%d", num), nil
  }
docs: // normalizePortPortion attempts to normalize the "port portion" of a hostname,
  // which begins with the first colon in the hostname and should be followed
  // by a string of decimal digits.
  //
  // If the port portion is valid, a normalized version of it is returned along
  // with a nil error.
  //
  // If the port portion is invalid, the input string is returned verbatim along
  // with a non-nil error.
  //
  // An empty string is a valid port portion representing the absense of a port.
  // If non-empty, the first character must be a colon.