From f85e6548c79648b8bcff8ee83142983bbb15dacb Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Fri, 29 Mar 2013 13:18:59 -0700 Subject: [PATCH] Comment to explain CmdStream --- archive.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/archive.go b/archive.go index 78d4dfca0b..71a51b68b9 100644 --- a/archive.go +++ b/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 {