Add platform-independent path/config resolution library
Implements core/paths (Config/Data/State/Cache/Runtime/Log/Bin
directory resolution with canonical-vs-search-dir separation, XDG on
Unix, native APPDATA/LOCALAPPDATA/PROGRAMDATA layering on Windows,
~/Library on macOS Desktop, injectable environment/platform for
deterministic cross-platform tests) and core/config (file search,
first-match resolution, layered YAML merging, safe ${VAR} expansion,
Explain/doctor introspection) on top of the shared Application/
Kind/Scope model in the core package.
This commit is contained in:
1 parent
027b327c3d
commit
13801bec11
41 files changed
+4834
-2
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package paths
|
||||
|
||||
// linuxFlavor implements Linux's Filesystem Hierarchy Standard
|
||||
// conventions for SystemScope, and is also the fallback used for any
|
||||
// other Unix-family GOOS this package does not yet tune individually
|
||||
// (see AGENTS.md TODO: "further Unix/BSD platforms without a redesign").
|
||||
var linuxFlavor = unixFlavor{
|
||||
systemConfigDirs: []string{"/etc"},
|
||||
systemDataDirs: []string{"/usr/local/share", "/usr/share"},
|
||||
systemDataBase: "/var/lib",
|
||||
systemStateBase: "/var/lib",
|
||||
systemCacheBase: "/var/cache",
|
||||
systemRuntimeBase: "/run",
|
||||
systemLogBase: "/var/log",
|
||||
systemBinDir: "/usr/local/bin",
|
||||
}
|
||||
Reference in new issue
Block a user