mirror of
https://github.com/spf13/viper
synced 2025-05-06 20:27:17 +00:00
export GetConfigFile function, very useful for extending viper
This commit is contained in:
parent
d493c32b69
commit
3092f8771d
1 changed files with 6 additions and 0 deletions
6
viper.go
6
viper.go
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue