File: cache.go

package info (click to toggle)
golang-github-kyoh86-xdg 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 180 kB
  • sloc: makefile: 13
file content (12 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
package xdg

const (
	// CacheHomeEnv is the name of the environment variable holding a cache directory path.
	CacheHomeEnv = "XDG_CACHE_HOME"
)

// FindCacheFile finds a file from the XDG data directory.
// If one cannot be found, an error `ErrNotFound` be returned.
func FindCacheFile(rel ...string) (string, error) {
	return findFile([]string{CacheHome()}, rel)
}