user

package
v0.0.0-...-8680cc4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PasswdFile keeps user passwd information
	PasswdFile = "/etc/passwd"
	// GroupFile keeps group information
	GroupFile = "/etc/group"
)

Functions

func Get

func Get(passwdPath, groupPath, username string, groups []string) (uint32, uint32, []uint32, error)

Get accepts user and group slice, return valid uid, gid and additional gids. Through Get is a interface returns all user informations runtime-spec need.

func GetAdditionalGids

func GetAdditionalGids(groups []string) []uint32

GetAdditionalGids parse supplementary gids from slice groups.

func ParseID

func ParseID(file, str string, parserFilter filterFunc) (uint32, error)

ParseID parses id or name from given file.

func ParseString

func ParseString(line string, v ...interface{})

ParseString parses line in format a:b:c.

Types

This section is empty.

Jump to

Keyboard shortcuts

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