mirror of https://github.com/perkeep/perkeep.git
add CacheDir to osutil
Change-Id: I8f6b1d6c8d1b275d329eeac2d91e15a3582e59fb
This commit is contained in:
parent
e1bb80e41e
commit
f9e453e666
|
@ -30,6 +30,13 @@ func HomeDir() string {
|
|||
return os.Getenv("HOME")
|
||||
}
|
||||
|
||||
func CacheDir() string {
|
||||
if runtime.GOOS == "windows" || runtime.GOOS == "darwin" {
|
||||
panic("CacheDir not implemented on OS == " + runtime.GOOS)
|
||||
}
|
||||
return filepath.Join(HomeDir(), ".cache")
|
||||
}
|
||||
|
||||
func CamliConfigDir() string {
|
||||
if p := os.Getenv("CAMLI_CONFIG_DIR"); p != "" {
|
||||
return p
|
||||
|
|
Loading…
Reference in New Issue