Skip to content

nemith/dothome

Repository files navigation

dothome

Go Reference

dothome is a Go library for dealing with configuration, cache, and data directories in a users home directory on various platforms.

It was highly inspired by Rust's etcetera where you can choose to override the native specification on Apple to use an XDG layout instead. This was to be nicer to users running CLI apps who don't want their config files burried a pile of plists in a $HOME/Library/Preferences and prefer something like .config/myapp/myapp.conf.

Basic Usage

import "github.com/nemith/dothome"

layout, err := dothome.CLIAppLayout(dothome.AppConfig{Name: "foo"})
if err != nil {
    panic(err)
}
fmt.Println(layout.ConfigDir)
// Output: /home/user/.config/foo

About

Simple and opinionated home config, data, and cache directories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages