Closed
Description
I've seen a dozen or so implementations of looking up the user's cache directory.
The latest is from @rsc in:
https://go-review.googlesource.com/c/go/+/68116/3/src/cmd/go/internal/cache/default.go
Which says:
// TODO(rsc): This code belongs somewhere else,
// like maybe ioutil.CacheDir or os.CacheDir.
Some examples of other implementations:
https://godoc.org/go4.org/xdgdir
https://godoc.org/camlistore.org/pkg/osutil#CacheDir
https://github.com/golang/crypto/blob/bd6f299fb381e4c3393d1c4b1f0b94f5e77650c8/acme/autocert/listener.go#L142
Consolidate into std?