code: func (cfg *Config) validateAddrs(ctx context.Context) error {
  	// Validate the advertise address.
  	advScheme, advHost, advPort, err := validateAdvertiseAddr(ctx, cfg.Advertise, cfg.Bind)
  	if err != nil {
  		return errors.Wrapf(err, "validating advertise address")
  	}
  	cfg.Advertise = schemeHostPortString(advScheme, advHost, advPort)
  
  	// Validate the listen address.
  	listenScheme, listenHost, listenPort, err := validateListenAddr(ctx, cfg.Bind)
  	if err != nil {
  		return errors.Wrap(err, "validating listen address")
  	}
  	cfg.Bind = schemeHostPortString(listenScheme, listenHost, listenPort)
  
  	return nil
  }
docs: // validateAddrs controls the address fields in the Config object
  // and fills in any blanks.
  // The addresses fields must be guaranteed by the caller to either be
  // completely empty, or have both a host part and a port part
  // separated by a colon. In the latter case either can be empty to
  // indicate it's left unspecified.