Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExecCommand = executeCommand
Alias for os/exec.Command to allow mocking the command executions in tests. see https://npf.io/2015/06/testing-exec-command/ for more information about.
Functions ¶
func ExecSudoCommand ¶
ExecSudoCommand executes the given command in the same way as os.ExecCommand would do it. But with the difference that ExecSudoCommand prefixes the command with sudo.
func InitSudo ¶
func InitSudo() error
Executes echo with sudo and connected stdin, stdout and stderr to ask for the users password. This allows to use sudo for commands which internal process stdout and stderr which are not connected to the current tty.
func IsExitCode ¶
IsExitCode checks the given error for a process exit error and if the exit code is the expected one.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.