diff --git a/config/command.go b/config/command.go index 1e02728..32311f8 100644 --- a/config/command.go +++ b/config/command.go @@ -1,6 +1,9 @@ package config -import "os/exec" +import ( + "fmt" + "os/exec" +) type Command struct { Program string @@ -17,3 +20,11 @@ func (c Command) Execute(payload string) ([]byte, error) { return exec.Command(c.Program, arguments...).Output() } + +func (c Command) String() string { + return fmt.Sprintf( + "", + append([]string{c.Program}, c.Arguments...), + c.AppendPayload, + ) +}