From 0b5d0eb92c5be2f0ddb2fa73990f31e5654e57fe Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 15:16:55 +0200 Subject: krino: 0.0.5 — keyword cache, t and d in review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/xdg/xdg.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/xdg/xdg.go') diff --git a/internal/xdg/xdg.go b/internal/xdg/xdg.go index ed34838..be13650 100644 --- a/internal/xdg/xdg.go +++ b/internal/xdg/xdg.go @@ -18,6 +18,9 @@ func StateHome() string { return base("XDG_STATE_HOME", filepath.Join(".local", // DataHome is $XDG_DATA_HOME, or ~/.local/share. func DataHome() string { return base("XDG_DATA_HOME", filepath.Join(".local", "share")) } +// CacheHome is $XDG_CACHE_HOME, or ~/.cache. +func CacheHome() string { return base("XDG_CACHE_HOME", ".cache") } + // base follows the XDG rule that a relative value is invalid and ignored. func base(env, fallback string) string { if v := os.Getenv(env); filepath.IsAbs(v) { -- cgit v1.3