Documentation ¶
Index ¶
- func CopyFileContents(src string, dst string, permission os.FileMode) error
- func FileExists(path string) bool
- func RemoveFileAsRoot(reason, filepath string) error
- func ReplaceEnv(variables []string, varName string, value string) []string
- func RunWithDefaultLocale(command string, args ...string) (string, string, error)
- func RunWithDefaultLocalePrivate(command string, args ...string) (string, string, error)
- func RunWithPrivilege(reason string, cmdAndArgs ...string) (string, string, error)
- func WriteFileIfContentChanged(path string, new_content []byte, perm os.FileMode) (bool, error)
- func WriteToFileAsRoot(reason, content, filepath string, mode os.FileMode) error
- type OS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func RemoveFileAsRoot ¶
func ReplaceEnv ¶
ReplaceEnv changes the value of an environment variable It drops the existing value and appends the new value in-place
func RunWithDefaultLocale ¶
func RunWithPrivilege ¶
RunWithPrivilege executes a command using sudo provide a reason why root is needed as the first argument
Types ¶
Click to show internal directories.
Click to hide internal directories.