Skip to content

Commit

Permalink
os/user: add stubs for Lookup{,Group} and Group
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondburned authored and aykevl committed May 28, 2024
1 parent f7c0466 commit 7b7601d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/os/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,21 @@ type User struct {
func Current() (*User, error) {
return nil, errors.New("user: Current not implemented")
}

// Lookup always returns an error.
func Lookup(username string) (*User, error) {
return nil, errors.New("user: Lookup not implemented")
}

// Group represents a grouping of users.
//
// On POSIX systems Gid contains a decimal number representing the group ID.
type Group struct {
Gid string // group ID
Name string // group name
}

// LookupGroup always returns an error.
func LookupGroup(name string) (*Group, error) {
return nil, errors.New("user: LookupGroup not implemented")
}

0 comments on commit 7b7601d

Please sign in to comment.