Files
lazygit/vendor/github.com/ionrock/procs/example_predefined_cmds_test.go
2018-10-27 14:56:15 +02:00

24 lines
305 B
Go

package procs_test
import (
"fmt"
"os/exec"
"github.com/ionrock/procs"
)
func Example_predefinedCmds() {
p := procs.Process{
Cmds: []*exec.Cmd{
exec.Command("echo", "foo"),
exec.Command("grep", "foo"),
},
}
p.Run()
out, _ := p.Output()
fmt.Println(string(out))
// Output:
// foo
}