gohls
gohls copied to clipboard
Use linux default cache folder (and make it configurable)
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 ?
Use for it:
cacheDir, err:= os.UserCacheDir()
if err == nil {
cacheDir = path.Join(cacheDir, "gohls")
} else {
your fallback ... or panic
}
(see docu)