Documentation ¶
Overview ¶
Package permvar implements the setting of persistent environment variables.
The environment variables must be named with only English capital letters and underscore (_) signs.
Index ¶
- Variables
- func MSet(keys, values []string) error
- func MSetForUid(id int, keys, values []string) error
- func MSetsys(keys, values []string) error
- func MSetsysForUid(id int, keys, values []string) error
- func Set(key, value string) error
- func SetForUid(id int, key, value string) error
- func Setsys(key, value string) error
- func SetsysForUid(id int, key, value string) error
- type NoHomeError
- type NoShellError
Constants ¶
This section is empty.
Variables ¶
var ErrNoRoot = errors.New("you have to be Root")
Functions ¶
func MSet ¶
MSet sets multiple values of the environment variables named by the keys that affects the current user. It returns an error, if any.
func MSetForUid ¶
MSetForUid sets multiple values of the environment variables named by the keys that affects a particular user. It returns an error, if any.
func MSetsys ¶
MSetsys sets multiple values of the environment variables named by the keys that affects the system as a whole. You must be Root. It returns an error, if any.
func MSetsysForUid ¶
MSetsysForUid sets multiple values of the environment variables named by the keys that affects the system as a whole. You must be Root. It returns an error, if any.
func Set ¶
Set sets the value of the environment variable named by the key that affects the current user. It returns an error, if any.
func SetForUid ¶
SetForUid sets the value of the environment variable named by the key that affects a particular user. It returns an error, if any.
func Setsys ¶
Setsys sets the value of the environment variable named by the key that affects the system as a whole. You must be Root. It returns an error, if any.
func SetsysForUid ¶
SetsysForUid sets the value of the environment variable named by the key that affects the system as a whole. You must be Root. It returns an error, if any.
Types ¶
type NoHomeError ¶
type NoHomeError string
NoHomeError represents an account without home directory.
func (NoHomeError) Error ¶
func (e NoHomeError) Error() string
type NoShellError ¶
type NoShellError string
NoShellError represents an account without shell.
func (NoShellError) Error ¶
func (e NoShellError) Error() string