MCPcopy Create free account
hub / github.com/openclaw/gogcli / commandIO

Function commandIO

internal/cmd/runtime.go:374–388  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

372}
373
374func commandIO(ctx context.Context) app.IO {
375 commandIO := newDefaultRuntime().IO
376 if runtimeIO, ok := app.IOFromContext(ctx); ok {
377 if runtimeIO.In != nil {
378 commandIO.In = runtimeIO.In
379 }
380 if runtimeIO.Out != nil {
381 commandIO.Out = runtimeIO.Out
382 }
383 if runtimeIO.Err != nil {
384 commandIO.Err = runtimeIO.Err
385 }
386 }
387 return commandIO
388}
389
390func stdoutWriter(ctx context.Context) io.Writer {
391 return commandIO(ctx).Out

Callers 5

RunMethod · 0.85
stdoutWriterFunction · 0.85
stderrWriterFunction · 0.85
stdinReaderFunction · 0.85

Calls 2

IOFromContextFunction · 0.92
newDefaultRuntimeFunction · 0.85

Tested by 1