utils
import "go-cli-template/internal/utils"Index
- func ConfigPathGlobal() string
- func ConfigPathLocal(cwd string) string
- func TimeAgo(t time.Time) string
- func XDGCacheHome() string
- func XDGConfigHome() string
- func XDGDataHome() string
func ConfigPathGlobal
func ConfigPathGlobal() stringConfigPathGlobal returns the default global config file path.
func ConfigPathLocal
func ConfigPathLocal(cwd string) stringConfigPathLocal returns the local config file path for the given cwd.
func TimeAgo
func TimeAgo(t time.Time) stringTimeAgo returns a human-readable string representing how long ago the given time was.
func XDGCacheHome
func XDGCacheHome() stringXDGCacheHome returns the cache home directory with sensible defaults.
func XDGConfigHome
func XDGConfigHome() stringXDGConfigHome returns the config home directory with sensible defaults.
func XDGDataHome
func XDGDataHome() stringXDGDataHome returns the data home directory with sensible defaults.
Source
See internal/utils/ for implementation details.