Documentation ¶
Index ¶
- func CreateConfFileViper(filePath, confName, confType string) *viper.Viper
- func CreateEnvViper() *viper.Viper
- func ResetConfBool(value *bool, envViper *viper.Viper, configFileViper *viper.Viper, ...)
- func ResetConfInt(value *int, envViper *viper.Viper, configFileViper *viper.Viper, ...)
- func ResetConfString(value *string, envViper *viper.Viper, configFileViper *viper.Viper, ...)
- func ResetConfUInt(value *uint, envViper *viper.Viper, configFileViper *viper.Viper, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfFileViper ¶
CreateConfFileViper creates viper to read from config file Now the config file is JSON type, name is "config.json"
func CreateEnvViper ¶
CreateEnvViper creates viper to read variables from system enviroment
func ResetConfBool ¶
func ResetConfBool(value *bool, envViper *viper.Viper, configFileViper *viper.Viper, sectionName string, flagName string)
ResetConfBool resets Bool value to value from config files and system environment variable
func ResetConfInt ¶
func ResetConfInt(value *int, envViper *viper.Viper, configFileViper *viper.Viper, sectionName string, flagName string)
ResetConfInt resets INT value to value from config files and system environment variable
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.