export GetConfigFile function, very useful for extending viper

This commit is contained in:
liujianping 2018-07-12 11:17:21 +08:00
parent d493c32b69
commit 3092f8771d

View file

@ -1706,6 +1706,12 @@ func (v *Viper) SetConfigType(in string) {
}
}
// GetConfigFile gets the the configuration file path
func GetConfigFile() (string, error) { return v.getConfigFile() }
func (v *Viper) GetConfigFile() (string, error) {
return v.getConfigFile()
}
func (v *Viper) getConfigType() string {
if v.configType != "" {
return v.configType