mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/attach: avoid mem alloc for interface
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
parent
350b1cf6ea
commit
950bfe4193
1 changed files with 2 additions and 3 deletions
|
@ -2,7 +2,6 @@ package daemon
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
@ -69,10 +68,10 @@ func (daemon *Daemon) ContainerAttach(job *engine.Job) engine.Status {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if l.Stream == "stdout" && stdout {
|
if l.Stream == "stdout" && stdout {
|
||||||
fmt.Fprintf(job.Stdout, "%s", l.Log)
|
io.WriteString(job.Stdout, l.Log)
|
||||||
}
|
}
|
||||||
if l.Stream == "stderr" && stderr {
|
if l.Stream == "stderr" && stderr {
|
||||||
fmt.Fprintf(job.Stderr, "%s", l.Log)
|
io.WriteString(job.Stderr, l.Log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue