summaryrefslogtreecommitdiff
path: root/internal/cli
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli')
-rw-r--r--internal/cli/command.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/cli/command.go b/internal/cli/command.go
index 8208aac..e2ad6f1 100644
--- a/internal/cli/command.go
+++ b/internal/cli/command.go
@@ -10,8 +10,8 @@ import (
"strings"
)
-//Command describes a command that can be run using the methods in the
-//Implementation interface.
+// Command describes a command that can be run using the methods in the
+// Implementation interface.
type Command struct {
Program []string
WorkDir string
@@ -34,12 +34,12 @@ func (e commandError) Error() string {
)
}
-//CommandRunner is a function that can execute commands given to it.
-//This interface is only useful for unit tests; the default CommandRunner
-//suffices for all regular operation.
+// CommandRunner is a function that can execute commands given to it.
+// This interface is only useful for unit tests; the default CommandRunner
+// suffices for all regular operation.
type CommandRunner func(c Command, stdin io.Reader, stdout, stderr io.Writer) error
-//DefaultCommandRunner is a CommandRunner that actually executes the command.
+// DefaultCommandRunner is a CommandRunner that actually executes the command.
func DefaultCommandRunner(c Command, stdin io.Reader, stdout, stderr io.Writer) error {
cmd := exec.Command(c.Program[0], c.Program[1:]...)
cmd.Stdin = stdin