mirror of
https://github.com/spf13/viper
synced 2024-12-24 20:47:02 +00:00
Simplifed function GetConfigFilePath()
This commit is contained in:
parent
48307d640f
commit
e867180379
1 changed files with 2 additions and 3 deletions
5
viper.go
5
viper.go
|
@ -1734,13 +1734,12 @@ func (v *Viper) getConfigFile() (string, error) {
|
||||||
return v.getConfigFile()
|
return v.getConfigFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetConfigFilePath() (string, error) {
|
func GetConfigFilePath() {
|
||||||
// Returns the path where Viper actually found the logfile it uses.
|
// Returns the path where Viper actually found the logfile it uses.
|
||||||
//
|
//
|
||||||
// Useful when you want to write the configPath to logfiles, stdout, etc.
|
// Useful when you want to write the configPath to logfiles, stdout, etc.
|
||||||
// Comes in handy during debugging or when running in production environments.
|
// Comes in handy during debugging or when running in production environments.
|
||||||
cf, err := v.getConfigFile()
|
return v.getConfigFile()
|
||||||
return cf, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Viper) searchInPath(in string) (filename string) {
|
func (v *Viper) searchInPath(in string) (filename string) {
|
||||||
|
|
Loading…
Reference in a new issue