grp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package grp provides some functions to query the group database of a UNIX system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Name   string
	Passwd string
	Gid    int
	Mem    []string
}

Group represents a record in the group database.

func Getgrall

func Getgrall() ([]*Group, error)

Getgrall returns all the records in the group database.

func Getgrgid

func Getgrgid(gid int) (*Group, error)

Getgrgid looks up the group database and returns the record matching the given GID. If no record is found, it returns (nil, nil). It is the equivalent of the C function getgrgid.

func Getgrnam

func Getgrnam(name string) (*Group, error)

Getgrnam looks up the group database and returns the record matching the given group name. If no record is found, it returns (nil, nil). It is the equivalent of the C function getgrnam.

Jump to

Keyboard shortcuts

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