소스 검색

Comment to explain CmdStream

Solomon Hykes 12 년 전
부모
커밋
f85e6548c7
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      archive.go

+ 3 - 0
archive.go

@@ -42,6 +42,9 @@ func Untar(archive io.Reader, path string) error {
 	return nil
 }
 
+// CmdStream executes a command, and returns its stdout as a stream.
+// If the command fails to run or doesn't complete successfully, an error
+// will be returned, including anything written on stderr.
 func CmdStream(cmd *exec.Cmd) (io.Reader, error) {
 	stdout, err := cmd.StdoutPipe()
 	if err != nil {