mirror of
https://github.com/spf13/viper
synced 2025-05-11 22:57:21 +00:00
Add SetViper() function
This commit is contained in:
parent
36be6bf91f
commit
a7650330d7
1 changed files with 5 additions and 0 deletions
5
viper.go
5
viper.go
|
@ -781,6 +781,11 @@ func GetViper() *Viper {
|
|||
return v
|
||||
}
|
||||
|
||||
// SetViper sets the global Viper instance.
|
||||
func SetViper(vp *Viper) {
|
||||
v=vp
|
||||
}
|
||||
|
||||
// Get can retrieve any value given the key to use.
|
||||
// Get is case-insensitive for a key.
|
||||
// Get has the behavior of returning the value associated with the first
|
||||
|
|
Loading…
Add table
Reference in a new issue