mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
add func:GetConfig
it returns v.config
This commit is contained in:
parent
0c82789feb
commit
cbfa4ca97e
1 changed files with 6 additions and 0 deletions
6
viper.go
6
viper.go
|
@ -449,6 +449,12 @@ func (v *Viper) SetTypeByDefaultValue(enable bool) {
|
|||
v.typeByDefValue = enable
|
||||
}
|
||||
|
||||
// GetConfig returns v.config
|
||||
func GetConfig() map[string]interface{} { return v.GetConfig() }
|
||||
func (v *Viper) GetConfig() map[string]interface{} {
|
||||
return v.config
|
||||
}
|
||||
|
||||
// Viper is essentially repository for configurations
|
||||
// Get can retrieve any value given the key to use
|
||||
// Get has the behavior of returning the value associated with the first
|
||||
|
|
Loading…
Reference in a new issue