Documentation
¶
Overview ¶
Package xdg provides functions for finding configuration files using the XDG Base Directory Standard.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Config ¶
Config finds the configuration file with the given name. It returns a path only if a file exists at that path; if all search directories are exhausted then the empty string is returned.
func ConfigDirs ¶
func ConfigDirs() []string
ConfigDirs returns a ordered list of directories to search for configuration files in. It is defined by the environment variable $XDG_CONFIG_DIRS, but if this is not present defaults to /etc/xdg.
func ConfigHome ¶
func ConfigHome() string
ConfigHome returns the directory configuration files should be stored in, this directory has higher precendence than those given by ConfigDirs. It is defined by the environment variable $XDG_CONFIG_HOME, but if this is not present defaults to $HOME/.config.
Types ¶
This section is empty.