osuser

package
v1.64.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Overview

Package osuser implements OS user lookup. It's a wrapper around os/user that works on non-cgo builds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupByUID

func LookupByUID(uid string) (*user.User, error)

LookupByUID is like os/user.LookupId but handles a few edge cases like gokrazy and non-cgo lookups.

func LookupByUIDWithShell

func LookupByUIDWithShell(uid string) (u *user.User, shell string, err error)

LookupByUIDWithShell is like os/user.LookupId but handles a few edge cases like gokrazy and non-cgo lookups, and returns the user shell. The user shell lookup is best-effort and may be empty.

func LookupByUsername

func LookupByUsername(username string) (*user.User, error)

LookupByUsername is like os/user.Lookup but handles a few edge cases like gokrazy and non-cgo lookups.

func LookupByUsernameWithShell

func LookupByUsernameWithShell(username string) (u *user.User, shell string, err error)

LookupByUsernameWithShell is like os/user.Lookup but handles a few edge cases like gokrazy and non-cgo lookups, and returns the user shell. The user shell lookup is best-effort and may be empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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