commit | c2eb06193f70475650a85a0e279f865181c1cece | [log] [tgz] |
---|---|---|
author | Kevin Burke <kev@inburke.com> | Wed Mar 01 10:31:57 2017 -0800 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Sat Mar 04 17:37:29 2017 +0000 |
tree | 1e4590b4b2b55a7c7c4ea3146499371581825c11 | |
parent | 4fc45ae8794eaa84505629e82997b90503c89aa2 [diff] |
os/user: add non-cgo versions of Lookup, LookupId If you cross compile for a Unix target and call user.Lookup("root") or user.LookupId("0"), we'll try to read the answer out of /etc/passwd instead of returning an "unimplemented" error. The equivalent cgo function calls getpwuid_r in glibc, which may reach out to the NSS database or allow callers to register extensions. The pure Go implementation only reads from /etc/passwd. Change-Id: I56a302d634b15ba5097f9f0d6a758c68e486ba6d Reviewed-on: https://go-review.googlesource.com/37664 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project does not use GitHub pull requests, and that we use the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.