code: func (c Configuration) Resolve() (string, error) {
  	listenAddrType := c.ListenAddressType
  
  	var listenAddress string
  	switch listenAddrType {
  	case ConfigResolver:
  		if c.Value == nil {
  			err := fmt.Errorf("missing listen address value using: resolver=%s",
  				string(listenAddrType))
  			return "", err
  		}
  		listenAddress = *c.Value
  
  	case EnvironmentResolver:
  		// environment variable for port is required
  		if c.EnvVarListenPort == nil {
  			err := fmt.Errorf("missing port env var name using: resolver=%s",
  				string(listenAddrType))
  			return "", err
  		}
  		portStr := os.Getenv(*c.EnvVarListenPort)
  		port, err := strconv.Atoi(portStr)
  		if err != nil {
  			err := fmt.Errorf("invalid port env var value using: resolver=%s, name=%s",
  				string(listenAddrType), *c.EnvVarListenPort)
  			return "", err
  		}
  		// if environment variable for hostname is not set, use the default
  		if c.EnvVarListenHost == nil {
  			listenAddress = fmt.Sprintf("%s:%d", defaultHostname, port)
  		} else {
  			envHost := os.Getenv(*c.EnvVarListenHost)
  			listenAddress = fmt.Sprintf("%s:%d", envHost, port)
  		}
  
  	default:
  		return "", fmt.Errorf("unknown listen address type: resolver=%s",
  			string(listenAddrType))
  	}
  
  	return listenAddress, nil
  }
docs: // Resolve returns the resolved listen address given the configuration.