feat: add a Start() helper function
This commit is contained in:
@@ -61,6 +61,13 @@ func (sc *ShellCmd) Execute() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start is a wrapper around exec.Command.Start()
|
||||||
|
func (sc *ShellCmd) Start() error {
|
||||||
|
sc.setup()
|
||||||
|
|
||||||
|
return sc.Command.Start()
|
||||||
|
}
|
||||||
|
|
||||||
// Output is a lightweight wrapper around exec.Command.Output()
|
// Output is a lightweight wrapper around exec.Command.Output()
|
||||||
func (sc *ShellCmd) Output() ([]byte, error) {
|
func (sc *ShellCmd) Output() ([]byte, error) {
|
||||||
sc.setup()
|
sc.setup()
|
||||||
|
|||||||
Reference in New Issue
Block a user