From 7b7601d77c681a3c2ce53ce3f89dbdfc35eec492 Mon Sep 17 00:00:00 2001 From: diamondburned Date: Tue, 28 May 2024 13:53:45 -0700 Subject: [PATCH] os/user: add stubs for `Lookup{,Group}` and `Group` --- src/os/user/user.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/os/user/user.go b/src/os/user/user.go index 7939380fb9..ee63625f2b 100644 --- a/src/os/user/user.go +++ b/src/os/user/user.go @@ -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") +}