Documentation ¶
Overview ¶
Config loaders to read/write files in directories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigDir ¶
Returns the absolute path to a specific folder within the system default configuration directory for the current user.
On Linux systems, this generally means ~/.config/<app>/<namespace>
func Refresh ¶
func Refresh()
Refresh values cached by OpenHomeDir.
Internally, OpenHomeDir caches some of the computed paths. Refresh() will cause those paths to be re-computed.
Don't bother calling Refresh() unless your project mingles with the HOME environment variable, or variables like XDG_CONFIG_HOME.
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
func OpenDir ¶
OpenDir returns a Loader capable of loading and creating config files in the specified directory.
func OpenHomeDir ¶
OpenHomeDir returns a Loader capable of loading and creating config files in the system default configuration directory for the current user.
On Linux systems, this generally means ~/.config/<app>/<namespace>/.