mirror of
https://github.com/spf13/viper
synced 2024-12-23 12:07:02 +00:00
Simplified to Default
and SetDefault
This commit is contained in:
parent
963ca4f768
commit
7b7d1442ac
1 changed files with 6 additions and 6 deletions
12
viper.go
12
viper.go
|
@ -174,15 +174,15 @@ func New() *Viper {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
// DefaultConfig retrieves the default Viper instance. To be loaded
|
// Default retrieves the default Viper instance. To be loaded later
|
||||||
// later with SetDefaultConfig.
|
// with SetDefault.
|
||||||
func DefaultConfig() *Viper {
|
func Default() *Viper {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDefaultConfig applies this Viper instance as the default. Used
|
// SetDefault applies this Viper instance as the default. Used when
|
||||||
// when calling the functions defined in the viper package.
|
// calling the functions defined in the viper package.
|
||||||
func SetDefaultConfig(conf *Viper) {
|
func SetDefault(conf *Viper) {
|
||||||
v = conf
|
v = conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue