]> Cypherpunks repositories - gostls13.git/commit
os: add UserConfigDir
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 2 Feb 2019 11:40:55 +0000 (11:40 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 5 Mar 2019 15:14:36 +0000 (15:14 +0000)
commitebdc24c3d334132542daa7c57246389e0b259227
tree69277bce32a011bea02e6e3288438140b54ee3ec
parentb3fac018f15e653ed69f19f4c85c811ef2a62b9f
os: add UserConfigDir

After UserCacheDir and UserHomeDir, the only remaining piece which is
commonly needed and portable is a per-user directory to store persistent
files.

For that purpose, UserCacheDir is wrong, as it's meant only for
temporary files. UserHomeDir is also far from ideal, as that clutters
the user's home directory.

Add UserConfigDir, which is implemented in a similar manner to
UserConfigDir.

Fixes #29960.

Change-Id: I7d7a56615103cf76e2b5e2bab2029a6b09d19f0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/160877
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/file.go