Documentation ¶
Overview ¶
Package os provides a set of functions to interact with the operating system.
Copyright © 2023 zcubbs https://github.com/zcubbs
Package os provides a set of functions to interact with the operating system.
Copyright © 2023 zcubbs https://github.com/zcubbs
Package os provides a set of functions to interact with the operating system.
Copyright © 2023 zcubbs https://github.com/zcubbs
Index ¶
- func AddNewUser(name string) (string, error)
- func AddUserIfNotExist(name string) (string, error)
- func CreateDirIfNotExist(dir string) error
- func CreateRandom(n int) string
- func DeleteUser(name string) error
- func DeleteUserIfExist(name string) error
- func Install(packages ...string) error
- func ReadEtcPasswd() (list []string)
- func Update() error
- func Upgrade() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewUser ¶
AddNewUser is created by executing shell command useradd
func AddUserIfNotExist ¶
AddUserIfNotExist check if user exist on the host
func CreateDirIfNotExist ¶ added in v1.1.6
func CreateRandom ¶
func DeleteUser ¶
DeleteUser is created by executing shell command userdel
func DeleteUserIfExist ¶
DeleteUserIfExist check if user exist on the host
func ReadEtcPasswd ¶
func ReadEtcPasswd() (list []string)
ReadEtcPasswd file /etc/passwd and return slice of users
Types ¶
This section is empty.