os

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewUser

func AddNewUser(name string) (string, error)

AddNewUser is created by executing shell command useradd

func AddUserIfNotExist

func AddUserIfNotExist(name string) (string, error)

AddUserIfNotExist check if user exist on the host

func CreateDirIfNotExist added in v1.1.6

func CreateDirIfNotExist(dir string) error

func CreateRandom

func CreateRandom(n int) string

func DeleteUser

func DeleteUser(name string) error

DeleteUser is created by executing shell command userdel

func DeleteUserIfExist

func DeleteUserIfExist(name string) error

DeleteUserIfExist check if user exist on the host

func Install

func Install(packages ...string) error

func ReadEtcPasswd

func ReadEtcPasswd() (list []string)

ReadEtcPasswd file /etc/passwd and return slice of users

func Update

func Update() error

func Upgrade

func Upgrade() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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