
godep restore pushd $GOPATH/src/github.com/appc/spec git co master popd go get go4.org/errorutil rm -rf Godeps godep save ./... git add vendor git add -f $(git ls-files --other vendor/) git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
31 lines
529 B
Go
31 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)
|
|
}
|