mirror of https://github.com/spf13/viper.git
Simplified to `Default` and `SetDefault`
This commit is contained in:
parent
963ca4f768
commit
7b7d1442ac
12
viper.go
12
viper.go
|
@ -174,15 +174,15 @@ func New() *Viper {
|
|||
return v
|
||||
}
|
||||
|
||||
// DefaultConfig retrieves the default Viper instance. To be loaded
|
||||
// later with SetDefaultConfig.
|
||||
func DefaultConfig() *Viper {
|
||||
// Default retrieves the default Viper instance. To be loaded later
|
||||
// with SetDefault.
|
||||
func Default() *Viper {
|
||||
return v
|
||||
}
|
||||
|
||||
// SetDefaultConfig applies this Viper instance as the default. Used
|
||||
// when calling the functions defined in the viper package.
|
||||
func SetDefaultConfig(conf *Viper) {
|
||||
// SetDefault applies this Viper instance as the default. Used when
|
||||
// calling the functions defined in the viper package.
|
||||
func SetDefault(conf *Viper) {
|
||||
v = conf
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue