pwd

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package `pwd` wraps system password functions `getpwnam(3)` and `getpwuid()`. It was inspired by <https://github.com/Maki-Daisuke/go-pwd>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Passwd

type Passwd struct {
	Name   string
	Passwd string
	UID    uint32
	GID    uint32
	Gecos  string
	Dir    string
	Shell  string
}

`Passwd` is the Go type that corresponds to the C `struct passwd` defined in `pwd.h`; see man page `getpwnam(3)`.

func Getpwnam

func Getpwnam(name string) *Passwd

`Getpwnam()` calls `getpwnam(3)`.

func Getpwuid

func Getpwuid(uid uint32) *Passwd

`Getpwuid()` calls `getpwuid()`; see man page `getpwnam(3)`.

Jump to

Keyboard shortcuts

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