Documentation
¶
Index ¶
- func FirstNonEmptyBool(v *viper.Viper, keys ...string) bool
- func FirstNonEmptyInt(v *viper.Viper, keys ...string) (int, bool)
- func FirstNonEmptyString(v *viper.Viper, keys ...string) string
- func GetString(v *viper.Viper, key string) string
- func GetStringMapString(v *viper.Viper, prefix string) map[string]string
- func MustNew() *viper.Viper
- func New() (*viper.Viper, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstNonEmptyBool ¶
FirstNonEmptyBool accepts multiple keys and returns the first non-empty bool value from viper.Viper via these keys. Non-empty meaning key not set will not be accepted. Will return false as second parameter, if non-empty bool value could not be retrieved.
func FirstNonEmptyInt ¶
FirstNonEmptyInt accepts multiple keys and returns the first non-empty int value from viper.Viper via these keys. Non-empty meaning key not set will not be accepted. Will return false as second parameter, if non-empty int value could not be retrieved.
func FirstNonEmptyString ¶
FirstNonEmptyString accepts multiple keys and returns the first non-empty string value from viper.Viper via these keys. Returns empty string by default if a value couldn't be found.
func GetStringMapString ¶ added in v1.42.1
GetStringMapString gets a parameter/setting by key prefix and strips any quotes.
Types ¶
This section is empty.