summary refs log blame commit diff stats
path: root/storage/getdir_darwin.go
blob: 8d6ebbfe3d579f6b3e2c48263814bf2a7ebda486 (plain) (tree)





















                                                                
// +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
}