]> Cypherpunks repositories - gostls13.git/commit
os/user: note in doc that user.Current is being cached
authorDavid Heuschmann <heuschmann.d@gmail.com>
Wed, 19 Sep 2018 15:00:09 +0000 (17:00 +0200)
committerIan Lance Taylor <iant@golang.org>
Tue, 25 Sep 2018 17:10:46 +0000 (17:10 +0000)
commiteff3de0e63a905fa29715d63393860dbab92294f
treec720746921c32da48f2002698cf89c6327c711b4
parent36a3d4f3fea7bbb22be061fbe830420990cd3ecf
os/user: note in doc that user.Current is being cached

user.Current caches the current user after its first call, so changes to
the uid after the first call will not affect its result. As this might
be unexpected, it should be mentioned in the docs.

Fixes #27659

Change-Id: I8b3323d55441d9a79bc9534c6490884d8561889b
Reviewed-on: https://go-review.googlesource.com/136315
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/user/lookup.go