code: func resolveAddr(ctx context.Context, host, port string) (string, string, error) {
  	resolver := net.DefaultResolver
  
  	// Resolve the port number. This may translate service names
  	// e.g. "postgresql" to a numeric value.
  	portNumber, err := resolver.LookupPort(ctx, "tcp", port)
  	if err != nil {
  		return "", "", errors.Wrapf(err, "resolving up port: %v", port)
  	}
  	port = strconv.Itoa(portNumber)
  
  	// Resolve the address.
  	if host == "" || host == "localhost" {
  		return host, port, nil
  	}
  
  	addr, err := lookupAddr(ctx, resolver, host)
  	if err != nil {
  		return "", "", errors.Wrap(err, "looking up address")
  	}
  	return addr, port, nil
  }
docs: // resolveAddr resolves non-numeric addresses to numeric (IP, port) addresses.