Add SetViper() function

This commit is contained in:
vuca 2021-04-26 08:57:18 +08:00
parent 36be6bf91f
commit a7650330d7

View file

@ -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