Documentation
¶
Index ¶
- func CombinedOutput(ctx context.Context, dir string, environ expand.Environ, cmd string, ...) ([]byte, error)
- func Command(ctx context.Context, dir string, environ expand.Environ, stdout io.Writer, ...) error
- func FormatCommandName(cmd string, args []string) string
- func ListVars(environ expand.Environ) map[string]string
- func Output(ctx context.Context, dir string, environ expand.Environ, cmd string, ...) ([]byte, error)
- func ShouldExecuteOnOS(os string) bool
- type FakeCommand
- func (f *FakeCommand) CombinedOutput() ([]byte, error)
- func (f *FakeCommand) Output() ([]byte, error)
- func (f *FakeCommand) Run(workingDirectory string, stdout io.Writer, stderr io.Writer, stdin io.Reader) error
- func (f *FakeCommand) RunWithEnv(stdout io.Writer, stderr io.Writer, stdin io.Reader, dir string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombinedOutput ¶
func FormatCommandName ¶
func ShouldExecuteOnOS ¶
Types ¶
type FakeCommand ¶
type FakeCommand struct {
OutputBytes []byte
}
FakeCommand is used for testing
func (*FakeCommand) CombinedOutput ¶
func (f *FakeCommand) CombinedOutput() ([]byte, error)
CombinedOutput runs the command and returns the stdout and stderr
func (*FakeCommand) Output ¶
func (f *FakeCommand) Output() ([]byte, error)
Output runs the command and returns the stdout
Click to show internal directories.
Click to hide internal directories.