(ctx context.Context)
| 372 | } |
| 373 | |
| 374 | func 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 | |
| 390 | func stdoutWriter(ctx context.Context) io.Writer { |
| 391 | return commandIO(ctx).Out |