Documentation
¶
Overview ¶
Package devlore names the locations the devlore tools share, beneath the XDG base directories.
One application tree — `devlore` — holds what writ and lore both read: configuration, cached artifacts, data, and run state. github.com/NobleFactor/devlore-cli/pkg/xdg resolves the bases; this package names what sits beneath them, and resolves nothing for itself.
Manual pages and shell completions are the exception, and sit directly beneath the base directories rather than in the application tree. Those locations are not ours to choose: `man` searches `<data>/man`, bash-completion scans `<data>/bash-completion/completions`, and fish scans `<config>/fish/completions`. A file installed anywhere else is a file the reader never finds.
Index ¶
- func BashCompletionPath(elem ...string) string
- func CacheHome() string
- func CachePath(elem ...string) string
- func ConfigHome() string
- func ConfigPath(elem ...string) string
- func DataHome() string
- func DataPath(elem ...string) string
- func FishCompletionPath(elem ...string) string
- func ManPath(elem ...string) string
- func StateHome() string
- func StatePath(elem ...string) string
- func WritLayersDir() string
- func WritReposDir() string
- func ZshCompletionPath(elem ...string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BashCompletionPath ¶
BashCompletionPath joins `elem` onto the user's bash completion directory.
Parameters:
- `elem`: path elements below the directory; none yields the directory itself.
Returns:
- `string`: `bash-completion/completions` beneath xdg.DataHome, plus `elem`.
func CacheHome ¶
func CacheHome() string
CacheHome returns the cache directory shared by the devlore tools.
Returns:
- `string`: the `devlore` directory beneath xdg.CacheHome.
func CachePath ¶
CachePath joins `elem` onto CacheHome.
Parameters:
- `elem`: path elements below the shared cache directory.
Returns:
- `string`: the joined path.
func ConfigHome ¶
func ConfigHome() string
ConfigHome returns the configuration directory shared by the devlore tools.
Returns:
- `string`: the `devlore` directory beneath xdg.ConfigHome.
func ConfigPath ¶
ConfigPath joins `elem` onto ConfigHome.
Parameters:
- `elem`: path elements below the shared configuration directory.
Returns:
- `string`: the joined path.
func DataHome ¶
func DataHome() string
DataHome returns the data directory shared by the devlore tools.
Returns:
- `string`: the `devlore` directory beneath xdg.DataHome.
func DataPath ¶
DataPath joins `elem` onto DataHome.
Parameters:
- `elem`: path elements below the shared data directory.
Returns:
- `string`: the joined path.
func FishCompletionPath ¶
FishCompletionPath joins `elem` onto the user's fish completion directory.
Parameters:
- `elem`: path elements below the directory; none yields the directory itself.
Returns:
- `string`: `fish/completions` beneath xdg.ConfigHome, plus `elem`.
func ManPath ¶
ManPath joins `elem` onto the user's section 1 manual directory.
Parameters:
- `elem`: path elements below the directory; none yields the directory itself.
Returns:
- `string`: `man/man1` beneath xdg.DataHome, plus `elem`.
func StateHome ¶
func StateHome() string
StateHome returns the state directory shared by the devlore tools.
Returns:
- `string`: the `devlore` directory beneath xdg.StateHome.
func StatePath ¶
StatePath joins `elem` onto StateHome.
Parameters:
- `elem`: path elements below the shared state directory.
Returns:
- `string`: the joined path.
func WritLayersDir ¶
func WritLayersDir() string
WritLayersDir returns the layer registry — one symlink per layer, each naming that layer's working tree.
Returns:
- `string`: `devlore/writ/layers` beneath xdg.DataHome.
func WritReposDir ¶
func WritReposDir() string
WritReposDir returns the writ-owned repository home, the default clone destination for `writ repo add`.
Returns:
- `string`: `devlore/writ/repos` beneath xdg.DataHome.
func ZshCompletionPath ¶
ZshCompletionPath joins `elem` onto the user's zsh function directory.
Parameters:
- `elem`: path elements below the directory; none yields the directory itself.
Returns:
- `string`: `zsh/site-functions` beneath xdg.DataHome, plus `elem`.
Types ¶
This section is empty.