Documentation ¶
Overview ¶
Package pwd is a thin wrapper of C library <pwd.h>. This is designed as thin as possible, but aimed to be thread-safe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Passwd ¶
type Passwd struct { Name string // user name Passwd string // user password UID uint32 // user ID GID uint32 // group ID Gecos string // real name Dir string // home directory Shell string // shell program }
Passwd represents an entry of the user database defined in <pwd.h>
func Getpwents ¶
func Getpwents() []*Passwd
Getpwents returns all entries in the user databases. This is aimed to be thread-safe, that is, if a goroutine is executing this function, another goroutine is blocked until it completes.
Click to show internal directories.
Click to hide internal directories.