code: func certHostname(listen, baseURL string) (string, error) {
  	hostPort, err := netutil.HostPort(baseURL)
  	if err != nil {
  		hostPort = listen
  	}
  	hostname, _, err := net.SplitHostPort(hostPort)
  	if err != nil {
  		return "", fmt.Errorf("failed to find hostname for cert from address %q: %v", hostPort, err)
  	}
  	return hostname, nil
  }
docs: // certHostname figures out the name to use for the TLS certificates, using baseURL
  // and falling back to the listen address if baseURL is empty or invalid.