MCPcopy Create free account
hub / github.com/Shopify/goose / ExampleSupervisor_RunAndGetOutput

Function ExampleSupervisor_RunAndGetOutput

shell/shell_test.go:37–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37func ExampleSupervisor_RunAndGetOutput() {
38 ctx := context.Background()
39 cmd := New(ctx, "echo", "-n", "foo")
40 stdout, stderr, err := cmd.RunAndGetOutput()
41
42 fmt.Println(string(stdout))
43 fmt.Println(string(stderr))
44 fmt.Println(err)
45 // Output:
46 // foo
47 //
48 // <nil>
49}
50
51func ExampleBuilder_WithEnv() {
52 ctx := context.Background()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
RunAndGetOutputMethod · 0.65

Tested by

no test coverage detected