~liliace/xdg

Go helpers for reading and writing files in the XDG Base Directories
fix: add space between path and "in" in errors
rename: Dockerfile -> Containerfile

clone

read-only
https://git.sr.ht/~liliace/xdg
read/write
git@git.sr.ht:~liliace/xdg

You can also use your local clone with git send-email.

#xdg Go Documentation

Go helpers for reading and writing files in the XDG Base Directories.

#Example usage

xdg.WriteSysConfig([]byte("some default config"), "myapp", "config.yaml")
xdg.WriteUserConfig([]byte("some user config"), "myapp/config.yaml")
xdg.WriteState([]byte("some log file"), "myapp", "logs", "errors.log")

data, err := xdg.ReadConfig("myapp", "config.yaml")
data, err := xdg.ReadCache("myapp", "subdir", "filename")