소스 검색

daemon: Rename copy to copyFunc

"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>
Akihiro Suda 9 년 전
부모
커밋
8bce6265fc
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      daemon/monitor.go

+ 3 - 3
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)
 		s.Add(1)
 		go func() {
 		go func() {
 			if _, err := io.Copy(w, r); err != nil {
 			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 {
 	if iop.Stdout != nil {
-		copy(s.Stdout(), iop.Stdout)
+		copyFunc(s.Stdout(), iop.Stdout)
 	}
 	}
 	if iop.Stderr != nil {
 	if iop.Stderr != nil {
-		copy(s.Stderr(), iop.Stderr)
+		copyFunc(s.Stderr(), iop.Stderr)
 	}
 	}
 
 
 	return nil
 	return nil