Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use linux default cache folder (and make it configurable) #35

Open
genofire opened this issue Feb 17, 2019 · 1 comment
Open

Use linux default cache folder (and make it configurable) #35

genofire opened this issue Feb 17, 2019 · 1 comment

Comments

@genofire
Copy link
Contributor

For user running create a subfolder into ~/.cache (e.g. ~/.cache/gohls) and for global / run as service /var/cache/.

But maybe somebody want to cange it into a folder of /tmp ... could you make it configurable ?

@genofire
Copy link
Contributor Author

Use for it:

cacheDir, err:= os.UserCacheDir()
if err == nil {
  cacheDir = path.Join(cacheDir, "gohls")
} else {
  your fallback ... or panic
}

(see docu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants