osutil

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerGroup added in v0.0.14

func DockerGroup() uint32

Dockergroup returns the gid of the docker group.

func EnvVars added in v0.0.19

func EnvVars(env []string) []string

func Groups added in v0.0.14

func Groups(u string) []uint32

Groups returns the supplement groups the user is a member of.

func Home

func Home(u string) string

User looks up the username u and return the home directory.

func Hostname

func Hostname() string

Hostname returns the hostname of this host. If it fails the value $HOSTNAME is returned.

func RunAs added in v0.0.19

func RunAs(cmd *exec.Cmd, user string) error

func User

func User(u string) (uint32, uint32)

User looks up the username u and return the uid and gid. If the username can't be found 0, 0 is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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