func (c Config) ValidateProduction() error {
	if !(len(c.SSLMode) == 0 ||
		stringutil.EqualsCaseless(c.SSLMode, SSLModeRequire) ||
		stringutil.EqualsCaseless(c.SSLMode, SSLModeVerifyCA) ||
		stringutil.EqualsCaseless(c.SSLMode, SSLModeVerifyFull)) {
		return ex.New(ErrUnsafeSSLMode, ex.OptMessagef("sslmode: %s", c.SSLMode))
	}
	if len(c.Username) == 0 {
		return ex.New(ErrUsernameUnset)
	}
	if len(c.Password) == 0 {
		return ex.New(ErrPasswordUnset)
	}
	return c.Validate()
}
// ValidateProduction validates production configuration for the config.
ValidateProduction validates production configuration for the config.
// ValidateProduction validates production configuration for the config .
func (c Config) ValidateProduction() error {
	if !(len(c.SSLMode) == 0 ||
		stringutil.EqualsCaseless(c.SSLMode, SSLModeRequire) ||
		stringutil.EqualsCaseless(c.SSLMode, SSLModeVerifyCA) ||
		stringutil.EqualsCaseless(c.SSLMode, SSLModeVerifyFull)) {
		return ex.New(ErrUnsafeSSLMode, ex.OptMessagef("sslmode: %s", c.SSLMode))
	}
	if len(c.Username) == 0 {
		return ex.New(ErrUsernameUnset)
	}
	if len(c.Password) == 0 {
		return ex.New(ErrPasswordUnset)
	}
	return c.Validate()
}
func ( c Config ) ValidateProduction ( ) error { if ! ( len ( c . SSLMode ) == 0 || stringutil . EqualsCaseless ( c . SSLMode , SSLModeRequire ) || stringutil . EqualsCaseless ( c . SSLMode , SSLModeVerifyCA ) || stringutil . EqualsCaseless ( c . SSLMode , SSLModeVerifyFull ) ) { return ex . New ( ErrUnsafeSSLMode , ex . OptMessagef ( " " , c . SSLMode ) ) } if len ( c . Username ) == 0 { return ex . New ( ErrUsernameUnset ) } if len ( c . Password ) == 0 { return ex . New ( ErrPasswordUnset ) } return c . Validate ( ) }
ValidateProduction validates production configuration for the config.
ValidateProduction validates production configuration for the config .