From 8bce6265fca22c117cf6d69d9ffd4ee78da9db8a Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Wed, 1 Jun 2016 06:50:23 +0000 Subject: [PATCH] daemon: Rename copy to copyFunc "copy" can be misleading for humans because Go has its own builtin "copy" function Signed-off-by: Akihiro Suda --- daemon/monitor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/monitor.go b/daemon/monitor.go index 95e7af3e1b..cb334cf29d 100644 --- a/daemon/monitor.go +++ b/daemon/monitor.go @@ -126,7 +126,7 @@ func (daemon *Daemon) AttachStreams(id string, iop libcontainerd.IOPipe) error { } } - copy := func(w io.Writer, r io.Reader) { + copyFunc := func(w io.Writer, r io.Reader) { s.Add(1) go func() { if _, err := io.Copy(w, r); err != nil { @@ -137,10 +137,10 @@ func (daemon *Daemon) AttachStreams(id string, iop libcontainerd.IOPipe) error { } if iop.Stdout != nil { - copy(s.Stdout(), iop.Stdout) + copyFunc(s.Stdout(), iop.Stdout) } if iop.Stderr != nil { - copy(s.Stderr(), iop.Stderr) + copyFunc(s.Stderr(), iop.Stderr) } return nil