Comment to explain CmdStream

This commit is contained in:
Solomon Hykes 2013-03-29 13:18:59 -07:00
parent c937e237ad
commit f85e6548c7
1 changed files with 3 additions and 0 deletions

View File

@ -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 {