]> Cypherpunks repositories - gostls13.git/commit
os: return an error from UserHomeDir to match UserCacheDir
authorDavid Heuschmann <heuschmann.d@gmail.com>
Tue, 20 Nov 2018 11:30:14 +0000 (12:30 +0100)
committerIan Lance Taylor <iant@golang.org>
Thu, 22 Nov 2018 20:49:16 +0000 (20:49 +0000)
commit649b89377e91ad6dbe710784f9e662082d31a1ff
tree22b07f7917d50907a964bb2829487add5f628934
parent6d5caf38e37bf9aeba3291f1f0b0081f934b1187
os: return an error from UserHomeDir to match UserCacheDir

UserHomeDir used to return an empty string if the corresponding
environment variable was not set. Changed it to return an error if the
variable is not set, to have the same signature and behaviour as UserCacheDir.

Fixes #28562

Change-Id: I42c497e8011ecfbbadebe7de1751575273be221c
Reviewed-on: https://go-review.googlesource.com/c/150418
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/crypto/x509/root_darwin.go
src/os/file.go
src/os/os_test.go