dd9309c15e
Initial vendor list validated with empty $GOPATH and only master checked out; followed by `make` and verified that all binaries build properly. Updates require github.com/LK4D4/vndr tool. Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
30 lines
529 B
Go
30 lines
529 B
Go
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
|
|
|
package user
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
// Unix-specific path to the passwd and group formatted files.
|
|
const (
|
|
unixPasswdPath = "/etc/passwd"
|
|
unixGroupPath = "/etc/group"
|
|
)
|
|
|
|
func GetPasswdPath() (string, error) {
|
|
return unixPasswdPath, nil
|
|
}
|
|
|
|
func GetPasswd() (io.ReadCloser, error) {
|
|
return os.Open(unixPasswdPath)
|
|
}
|
|
|
|
func GetGroupPath() (string, error) {
|
|
return unixGroupPath, nil
|
|
}
|
|
|
|
func GetGroup() (io.ReadCloser, error) {
|
|
return os.Open(unixGroupPath)
|
|
}
|