MCPcopy Index your code
hub / github.com/docker/cli / WithStandardStreams

Function WithStandardStreams

cli/command/cli_options.go:24–33  ·  view source on GitHub ↗

WithStandardStreams sets a cli in, out and err streams with the standard streams.

()

Source from the content-addressed store, hash-verified

22
23// WithStandardStreams sets a cli in, out and err streams with the standard streams.
24func WithStandardStreams() CLIOption {
25 return func(cli *DockerCli) error {
26 // Set terminal emulation based on platform as required.
27 stdin, stdout, stderr := term.StdStreams()
28 cli.in = streams.NewIn(stdin)
29 cli.out = streams.NewOut(stdout)
30 cli.err = streams.NewOut(stderr)
31 return nil
32 }
33}
34
35// WithBaseContext sets the base context of a cli. It is used to propagate
36// the context from the command line to the client.

Callers 1

NewDockerCliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…