Migrate from libkv to valkeyrie library
This commit is contained in:
parent
a91080b060
commit
563a0bd274
33 changed files with 109 additions and 115 deletions
13
vendor/github.com/containous/staert/staert.go
generated
vendored
13
vendor/github.com/containous/staert/staert.go
generated
vendored
|
@ -105,14 +105,8 @@ func (ts *TomlSource) ConfigFileUsed() string {
|
|||
|
||||
func preprocessDir(dirIn string) (string, error) {
|
||||
dirOut := dirIn
|
||||
if strings.HasPrefix(dirIn, "$") {
|
||||
end := strings.Index(dirIn, string(os.PathSeparator))
|
||||
if end == -1 {
|
||||
end = len(dirIn)
|
||||
}
|
||||
dirOut = os.Getenv(dirIn[1:end]) + dirIn[end:]
|
||||
}
|
||||
dirOut, err := filepath.Abs(dirOut)
|
||||
expanded := os.ExpandEnv(dirIn)
|
||||
dirOut, err := filepath.Abs(expanded)
|
||||
return dirOut, err
|
||||
}
|
||||
|
||||
|
@ -123,7 +117,8 @@ func findFile(filename string, dirNfile []string) string {
|
|||
if fileInfo, err := os.Stat(fullPath); err == nil && !fileInfo.IsDir() {
|
||||
return fullPath
|
||||
}
|
||||
fullPath = fullPath + "/" + filename + ".toml"
|
||||
|
||||
fullPath = filepath.Join(fullPath, filename+".toml")
|
||||
if fileInfo, err := os.Stat(fullPath); err == nil && !fileInfo.IsDir() {
|
||||
return fullPath
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue