github.com/tcnksm/go@v0.0.0-20141208075154-439b32936367/src/os/user/lookup.go (about) 1 // Copyright 2011 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package user 6 7 // Current returns the current user. 8 func Current() (*User, error) { 9 return current() 10 } 11 12 // Lookup looks up a user by username. If the user cannot be found, the 13 // returned error is of type UnknownUserError. 14 func Lookup(username string) (*User, error) { 15 return lookup(username) 16 } 17 18 // LookupId looks up a user by userid. If the user cannot be found, the 19 // returned error is of type UnknownUserIdError. 20 func LookupId(uid string) (*User, error) { 21 return lookupId(uid) 22 }