Per #27524 there are situations where the username for the
uid does not match the value in the $USER environment variable and it
seems sensible to choose the value in /etc/passwd when they disagree.
This may make the Current() call slightly more expensive, since we
read /etc/passwd with cgo disabled instead of just checking the
environment. However, we cache the result of Current() calls, so we
only invoke this cost once in the lifetime of the process.
Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org>
Run-TryBot: Ian Lance Taylor <email@example.com>
TryBot-Result: Gobot Gobot <firstname.lastname@example.org>