aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordiamondburned <[email protected]>2024-05-28 13:53:45 -0700
committerAyke <[email protected]>2024-05-28 23:56:51 +0200
commit7b7601d77c681a3c2ce53ce3f89dbdfc35eec492 (patch)
treecd4ecdcdf5382a0d15310c629e3f996a50894438
parentf7c0466f78fe97c578f298de639fd5248cc91ee4 (diff)
downloadtinygo-7b7601d77c681a3c2ce53ce3f89dbdfc35eec492.tar.gz
tinygo-7b7601d77c681a3c2ce53ce3f89dbdfc35eec492.zip
os/user: add stubs for `Lookup{,Group}` and `Group`
-rw-r--r--src/os/user/user.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/os/user/user.go b/src/os/user/user.go
index 7939380fb..ee63625f2 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")
+}