summary refs log tree commit diff stats
path: root/storage/getdir_darwin.go
blob: 8d6ebbfe3d579f6b3e2c48263814bf2a7ebda486 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// +build darwin

package storage

import (
	"fmt"
	"os"
)

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

	// Grus cache directory is cacheDir/grus
	grusCacheDir := fmt.Sprintf("%s/%s", cacheDir,
		"grus")

	return grusCacheDir
}