MCPcopy Index your code
hub / github.com/kopia/kopia / RunAndProcessStderrAsync

Method RunAndProcessStderrAsync

tests/testenv/cli_test_env.go:188–197  ·  view source on GitHub ↗

RunAndProcessStderrAsync runs the given command, and streams its stderr line-by-line stderrCallback until it returns false.

(tb testing.TB, stderrCallback func(line string) bool, stderrAsyncCallback func(line string), args ...string)

Source from the content-addressed store, hash-verified

186
187// RunAndProcessStderrAsync runs the given command, and streams its stderr line-by-line stderrCallback until it returns false.
188func (e *CLITest) RunAndProcessStderrAsync(tb testing.TB, stderrCallback func(line string) bool, stderrAsyncCallback func(line string), args ...string) (wait func() error, kill func()) {
189 tb.Helper()
190
191 wait, interrupt := e.RunAndProcessStderrInt(tb, stderrCallback, stderrAsyncCallback, args...)
192 kill = func() {
193 interrupt(os.Kill)
194 }
195
196 return wait, kill
197}
198
199// RunAndProcessStderrInt runs the given command, and streams its stderr
200// line-by-line to stderrCallback until it returns false. The remaining lines

Calls 2

HelperMethod · 0.80