1
0
Fork 0
mirror of https://github.com/Luzifer/staticmap.git synced 2024-12-21 05:11:18 +00:00
staticmap/vendor/github.com/Wessie/appdirs/appdirs_darwin.go
Knut Ahlers 759b968510
Vendor dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-06-27 22:50:36 +02:00

63 lines
1.4 KiB
Go

package appdirs
import (
"path/filepath"
)
func userDataDir(name, author, version string, roaming bool) (path string) {
path = ExpandUser("~/Library/Application Support")
if name != "" {
path = filepath.Join(path, name)
}
if name != "" && version != "" {
path = filepath.Join(path, version)
}
return path
}
func siteDataDir(name, author, version string) (path string) {
path = ExpandUser("/Library/Application Support")
if name != "" {
path = filepath.Join(path, name)
}
if name != "" && version != "" {
path = filepath.Join(path, version)
}
return path
}
func userConfigDir(name, author, version string, roaming bool) (path string) {
return UserDataDir(name, author, version, roaming)
}
func siteConfigDir(name, author, version string) (path string) {
return SiteDataDir(name, author, version)
}
func userCacheDir(name, author, version string, opinion bool) (path string) {
path = ExpandUser("~/Library/Caches")
if name != "" {
path = filepath.Join(path, name)
}
if name != "" && version != "" {
path = filepath.Join(path, version)
}
return path
}
func userLogDir(name, author, version string, opinion bool) (path string) {
path = ExpandUser("~/Library/Logs")
path = filepath.Join(path, name)
if name != "" && version != "" {
path = filepath.Join(path, version)
}
return path
}