code: func SplitHostMaybePort(hostport string) HostMaybePort {
  	host, portStr, err := net.SplitHostPort(hostport)
  	if err != nil {
  		if strings.Contains(err.Error(), "missing port") {
  			return HostMaybePort{
  				Host:   hostport,
  				NoPort: true,
  			}
  		}
  		return HostMaybePort{
  			Err: err,
  		}
  	}
  	portI64, err := strconv.ParseInt(portStr, 0, 0)
  	if err != nil {
  		return HostMaybePort{
  			Host: host,
  			Port: -1,
  			Err:  err,
  		}
  	}
  	return HostMaybePort{
  		Host: host,
  		Port: int(portI64),
  	}
  }
docs: // Parse a "hostport" string, a concept that floats around the stdlib a lot
  // and is painful to work with. If no port is present, what's usually present
  // is just the host.