feat: platform compatibility

Add experimental support for the following platforms:

- aix
- dragonfly
- illumos
- ios
- netbsd
- openbsd
- plan9
- solaris
This commit is contained in:
Christopher Allen Lane 2022-11-05 12:00:43 -04:00
parent c9ccefa607
commit 1a85c9e9c8
1 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,10 @@ func Paths(
}
switch sys {
case "android", "darwin", "linux", "freebsd":
// darwin/linux/unix
case "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios",
"linux", "netbsd", "openbsd", "plan9", "solaris":
paths := []string{}
// don't include the `XDG_CONFIG_HOME` path if that envvar is not set
@ -43,6 +46,8 @@ func Paths(
}...)
return paths, nil
// windows
case "windows":
return []string{
filepath.Join(envvars["APPDATA"], "cheat", "conf.yml"),