osutil: implement CacheDir on darwin

Change-Id: I73ef36039037f9469df5dc262b5b976cd33a1fd6
This commit is contained in:
Brad Fitzpatrick 2012-04-18 07:44:08 -07:00
parent 0f3ce52c54
commit c7333e7f9b
1 changed files with 4 additions and 1 deletions

View File

@ -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")