(ctx context.Context, name string, stdin io.Reader, stdout, stderr io.Writer, arg ...string)
| 34 | } |
| 35 | |
| 36 | func RunContext(ctx context.Context, name string, stdin io.Reader, stdout, stderr io.Writer, arg ...string) error { |
| 37 | exitCode, err := RunContextWithExitCode(ctx, name, stdin, stdout, stderr, arg...) |
| 38 | if err != nil { |
| 39 | return err |
| 40 | } |
| 41 | if exitCode != 0 { |
| 42 | return fmt.Errorf("failed to invoke %s(1)", name) |
| 43 | } |
| 44 | return nil |
| 45 | } |
| 46 | |
| 47 | func RunContextWithExitCode(ctx context.Context, |
| 48 | name string, |
no test coverage detected
searching dependent graphs…