Files
pekoe/internal/config/configpath_bsd.go
2026-04-03 00:09:40 +03:00

25 lines
543 B
Go

//go:build darwin || freebsd || openbsd || netbsd || dragonfly
// @tag config
// @tag platform:bsd
package config
import (
"os"
"path/filepath"
)
// DefaultConfigPaths returns the config file search paths for BSD and macOS.
// Looks up ~/.pekoe.json first, then /usr/local/etc/pekoe/config.json.
func DefaultConfigPaths() []string {
home, err := os.UserHomeDir()
if err != nil {
return []string{"/usr/local/etc/pekoe/config.json"}
}
return []string{
filepath.Join(home, ".pekoe.json"),
"/usr/local/etc/pekoe/config.json",
}
}