From c7333e7f9b04692a1520c9d8e03f40eae034cd55 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 18 Apr 2012 07:44:08 -0700 Subject: [PATCH] osutil: implement CacheDir on darwin Change-Id: I73ef36039037f9469df5dc262b5b976cd33a1fd6 --- pkg/osutil/paths.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/osutil/paths.go b/pkg/osutil/paths.go index 5595ff4fe..67a17bdd4 100644 --- a/pkg/osutil/paths.go +++ b/pkg/osutil/paths.go @@ -31,7 +31,10 @@ func HomeDir() string { } func CacheDir() string { - if runtime.GOOS == "windows" || runtime.GOOS == "darwin" { + switch runtime.GOOS { + case "darwin": + return filepath.Join(HomeDir(), "Library", "Caches", "Camlistore") + case "windows": panic("CacheDir not implemented on OS == " + runtime.GOOS) } return filepath.Join(HomeDir(), ".cache")