mirror of
https://github.com/spf13/viper
synced 2025-05-06 20:27:17 +00:00
Merge 70685607d8
into 0967fc9ace
This commit is contained in:
commit
afd117e0d8
1 changed files with 12 additions and 0 deletions
12
viper.go
12
viper.go
|
@ -184,6 +184,18 @@ func New() *Viper {
|
|||
return v
|
||||
}
|
||||
|
||||
// DefaultConfig retrieves the default Viper instance. To be loaded
|
||||
// later with SetDefaultConfig.
|
||||
func DefaultConfig() *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) {
|
||||
v = conf
|
||||
}
|
||||
|
||||
// Intended for testing, will reset all to default settings.
|
||||
// In the public interface for the viper package so applications
|
||||
// can use it in their testing as well.
|
||||
|
|
Loading…
Add table
Reference in a new issue