Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteCommand ¶
func SetPassword ¶
Types ¶
type LocalShell ¶
type LocalShell struct{}
LocalShell is the default shell that executes commands locally, basically calling `sh -c <cmd>` at the end of the day.
type Shell ¶
type Shell interface { // Execute runs the given command and returns the output and error. Execute(ctx context.Context, cmd string) (output []byte, err error) }
Wrap the exec call in a struct so that we can mock it in our tests.
var DefaultShell Shell = LocalShell{}
DefaultShell will be overridden in tests Set the default shell to be the local shell. TODO: still not happy with this pattern
Click to show internal directories.
Click to hide internal directories.