From e867180379fb2db97eb085418064d9ab6bdf4403 Mon Sep 17 00:00:00 2001 From: Fabian Knorr Date: Tue, 6 Feb 2018 20:14:04 +0100 Subject: [PATCH] Simplifed function GetConfigFilePath() --- viper.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/viper.go b/viper.go index 89e3326..78cd1e3 100644 --- a/viper.go +++ b/viper.go @@ -1734,13 +1734,12 @@ func (v *Viper) getConfigFile() (string, error) { return v.getConfigFile() } -func GetConfigFilePath() (string, error) { +func GetConfigFilePath() { // Returns the path where Viper actually found the logfile it uses. // // Useful when you want to write the configPath to logfiles, stdout, etc. // Comes in handy during debugging or when running in production environments. - cf, err := v.getConfigFile() - return cf, err + return v.getConfigFile() } func (v *Viper) searchInPath(in string) (filename string) {