"copy" can be misleading for humans because Go has its own builtin "copy" function
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
| ... | ... |
@@ -126,7 +126,7 @@ func (daemon *Daemon) AttachStreams(id string, iop libcontainerd.IOPipe) error {
|
| 126 | 126 |
} |
| 127 | 127 |
} |
| 128 | 128 |
|
| 129 |
- copy := func(w io.Writer, r io.Reader) {
|
|
| 129 |
+ copyFunc := func(w io.Writer, r io.Reader) {
|
|
| 130 | 130 |
s.Add(1) |
| 131 | 131 |
go func() {
|
| 132 | 132 |
if _, err := io.Copy(w, r); err != nil {
|
| ... | ... |
@@ -137,10 +137,10 @@ func (daemon *Daemon) AttachStreams(id string, iop libcontainerd.IOPipe) error {
|
| 137 | 137 |
} |
| 138 | 138 |
|
| 139 | 139 |
if iop.Stdout != nil {
|
| 140 |
- copy(s.Stdout(), iop.Stdout) |
|
| 140 |
+ copyFunc(s.Stdout(), iop.Stdout) |
|
| 141 | 141 |
} |
| 142 | 142 |
if iop.Stderr != nil {
|
| 143 |
- copy(s.Stderr(), iop.Stderr) |
|
| 143 |
+ copyFunc(s.Stderr(), iop.Stderr) |
|
| 144 | 144 |
} |
| 145 | 145 |
|
| 146 | 146 |
return nil |