summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/viper/util.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-01-18 20:34:42 +0100
committerGitHub <noreply@github.com>2022-01-18 20:34:42 +0100
commit6aa05b39810bef5b5cf21cb2abd02012ce727574 (patch)
treeef76720d307a7edd2b71f1ae005df8b62594d7cd /vendor/github.com/spf13/viper/util.go
parentaad60c882e16cd2c8769a49e6d9f87a040590d62 (diff)
downloadmatterbridge-msglm-6aa05b39810bef5b5cf21cb2abd02012ce727574.tar.gz
matterbridge-msglm-6aa05b39810bef5b5cf21cb2abd02012ce727574.tar.bz2
matterbridge-msglm-6aa05b39810bef5b5cf21cb2abd02012ce727574.zip
Bump github.com/spf13/viper from 1.9.0 to 1.10.1 (#1684)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.9.0 to 1.10.1. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.9.0...v1.10.1) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/spf13/viper/util.go')
-rw-r--r--vendor/github.com/spf13/viper/util.go22
1 files changed, 4 insertions, 18 deletions
diff --git a/vendor/github.com/spf13/viper/util.go b/vendor/github.com/spf13/viper/util.go
index 09d051a2..ee7a86d9 100644
--- a/vendor/github.com/spf13/viper/util.go
+++ b/vendor/github.com/spf13/viper/util.go
@@ -18,9 +18,7 @@ import (
"strings"
"unicode"
- "github.com/spf13/afero"
"github.com/spf13/cast"
- jww "github.com/spf13/jwalterweatherman"
)
// ConfigParseError denotes failing to parse configuration file.
@@ -88,8 +86,8 @@ func insensitiviseMap(m map[string]interface{}) {
}
}
-func absPathify(inPath string) string {
- jww.INFO.Println("Trying to resolve absolute path to", inPath)
+func absPathify(logger Logger, inPath string) string {
+ logger.Info("trying to resolve absolute path", "path", inPath)
if inPath == "$HOME" || strings.HasPrefix(inPath, "$HOME"+string(os.PathSeparator)) {
inPath = userHomeDir() + inPath[5:]
@@ -106,21 +104,9 @@ func absPathify(inPath string) string {
return filepath.Clean(p)
}
- jww.ERROR.Println("Couldn't discover absolute path")
- jww.ERROR.Println(err)
- return ""
-}
+ logger.Error(fmt.Errorf("could not discover absolute path: %w", err).Error())
-// Check if file Exists
-func exists(fs afero.Fs, path string) (bool, error) {
- stat, err := fs.Stat(path)
- if err == nil {
- return !stat.IsDir(), nil
- }
- if os.IsNotExist(err) {
- return false, nil
- }
- return false, err
+ return ""
}
func stringInSlice(a string, list []string) bool {