hosts

package
v1.3.14 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Passwd

type Passwd struct {
	FilePath string
	Mapping  map[string]*PasswdItem
}

func New

func New(filepath string) *Passwd

func (*Passwd) Get

func (p *Passwd) Get(user string) (*PasswdItem, error)

func (*Passwd) GetGID

func (p *Passwd) GetGID(user string) (int, error)

func (*Passwd) GetHome

func (p *Passwd) GetHome(user string) (string, error)

func (*Passwd) GetShell

func (p *Passwd) GetShell(user string) (string, error)

func (*Passwd) GetUID

func (p *Passwd) GetUID(user string) (int, error)

func (*Passwd) Length

func (p *Passwd) Length() int

func (*Passwd) Load

func (p *Passwd) Load() error

type PasswdItem

type PasswdItem struct {
	User  string
	Pass  string
	UID   int
	GID   int
	Gecos string
	Home  string
	Shell string
}

Jump to

Keyboard shortcuts

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