Documentation
¶
Overview ¶
Package xdg resolves the files fft keeps on disk to the XDG base directory they belong in: $XDG_<KIND>_HOME/fft/<name>, else the conventional directory under the user's home.
Which base a file belongs to is a decision about the file, not about this package: the config is something the user edits, the update cache is something fft can rebuild by asking again, credentials and history are state, and templates and components are data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base is one XDG base directory: the variable that overrides it and the directory under the home it falls back to.
The bases fft uses are handed out by functions rather than kept in exported variables, so that no importer can reassign one and move, say, the credentials file for the whole process.
func (Base) LookupPath ¶
LookupPath is Base.Path reading b's variable through lookup, os.LookupEnv when nil, and trimming it first: a variable holding only whitespace counts as unset.