github.com/mssola/docker@v1.8.1/daemon/execdriver/pipes.go (about) 1 package execdriver 2 3 import ( 4 "io" 5 ) 6 7 // Pipes is a wrapper around a containers output for 8 // stdin, stdout, stderr 9 type Pipes struct { 10 Stdin io.ReadCloser 11 Stdout, Stderr io.Writer 12 } 13 14 func NewPipes(stdin io.ReadCloser, stdout, stderr io.Writer, useStdin bool) *Pipes { 15 p := &Pipes{ 16 Stdout: stdout, 17 Stderr: stderr, 18 } 19 if useStdin { 20 p.Stdin = stdin 21 } 22 return p 23 }