diff options
Diffstat (limited to 'user.go')
-rw-r--r-- | user.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/user.go b/user.go deleted file mode 100644 index 1d47b5fb..00000000 --- a/user.go +++ /dev/null @@ -1,31 +0,0 @@ -package roadrunner - -import ( - "os/user" - "fmt" -) - -// resolveUser attempt to find system user by it's name or uid. -func resolveUser(u string) (usr *user.User, err error) { - usr, err = user.LookupId(u) - if usr != nil { - return usr, nil - } - - return user.Lookup(u) -} - -// resolveUser attempt to find system group by it's name or uid. -func resolveGroup(g string) (grp *user.Group, err error) { - grp, err = user.LookupGroupId(g) - if grp != nil && grp.Name != "nogroup" { - return grp, nil - } - - grp, err = user.LookupGroup(g) - if grp != nil && grp.Name != "nogroup" { - return grp, nil - } - - return nil, fmt.Errorf("no such group %s", g) -} |