From 1a85c9e9c8b2d33951d593f32179f4bddf491c11 Mon Sep 17 00:00:00 2001 From: Christopher Allen Lane Date: Sat, 5 Nov 2022 12:00:43 -0400 Subject: [PATCH] feat: platform compatibility Add experimental support for the following platforms: - aix - dragonfly - illumos - ios - netbsd - openbsd - plan9 - solaris --- internal/config/paths.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/config/paths.go b/internal/config/paths.go index 7818fbd..30c3a62 100644 --- a/internal/config/paths.go +++ b/internal/config/paths.go @@ -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"),