mirror of
https://github.com/cheat/cheat.git
synced 2024-12-22 04:35:06 +01:00
chore: refactors config.path
(small)
Performs a minor refactoring on `config.Paths` to consistently use `path.Join` when computing config directory paths. Previously, both `path.Join` and `fmt.Sprintf` were being used, strictly due to an oversight.
This commit is contained in:
parent
8a313b92ca
commit
408e944eea
@ -32,8 +32,8 @@ func Paths(sys string, envvars map[string]string) ([]string, error) {
|
||||
}, nil
|
||||
case "windows":
|
||||
return []string{
|
||||
fmt.Sprintf("%s/cheat/conf.yml", envvars["APPDATA"]),
|
||||
fmt.Sprintf("%s/cheat/conf.yml", envvars["PROGRAMDATA"]),
|
||||
path.Join(envvars["APPDATA"], "/cheat/conf.yml"),
|
||||
path.Join(envvars["PROGRAMDATA"], "/cheat/conf.yml"),
|
||||
}, nil
|
||||
default:
|
||||
return []string{}, fmt.Errorf("unsupported os: %s", sys)
|
||||
|
Loading…
Reference in New Issue
Block a user