user

package
v0.1.23-oss Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUser

func CurrentUser() (*osuser.User, error)

CurrentUser returns the current user. If os/user.Current() fails (e.g. in a statically linked binary in an environment where user information is resolved via NSS/LDAP rather than /etc/passwd), it falls back to inspecting environment variables ($USER, $LOGNAME, $USERNAME) and standard os functions (os.Getuid, os.Getgid, os.UserHomeDir).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL