Этот коммит содержится в:
Christopher Speller
2017-11-13 09:09:58 -08:00
коммит произвёл GitHub
родитель 7304a61ef5
Коммит 1329aa51b6
474 изменённых файлов: 84159 добавлений и 8829 удалений

5
vendor/github.com/spf13/viper/util.go сгенерированный поставляемый
Просмотреть файл

@@ -24,6 +24,7 @@ import (
"github.com/hashicorp/hcl"
"github.com/magiconair/properties"
toml "github.com/pelletier/go-toml"
"github.com/spf13/afero"
"github.com/spf13/cast"
jww "github.com/spf13/jwalterweatherman"
"gopkg.in/yaml.v2"
@@ -121,8 +122,8 @@ func absPathify(inPath string) string {
}
// Check if File / Directory Exists
func exists(path string) (bool, error) {
_, err := v.fs.Stat(path)
func exists(fs afero.Fs, path string) (bool, error) {
_, err := fs.Stat(path)
if err == nil {
return true, nil
}