summary refs log blame commit diff stats
path: root/cache/getdir_darwin.go
blob: 733e94ef722b869373f0c052094749fd80de5470 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                   
                                           




                                                  
                                                       



                            
// +build darwin

package cache

import (
	"fmt"
	"os"
)

// GetDir returns cetus cache directory. Default cache directory on
// macOS is $HOME/Library/Caches.
func GetDir() string {
	cacheDir := fmt.Sprintf("%s/%s/%s",
		os.Getenv("HOME"),
		"Library",
		"Caches")

	// Cetus cache directory is cacheDir/cetus
	cetusCacheDir := fmt.Sprintf("%s/%s", cacheDir,
		"cetus")

	return cetusCacheDir
}