]> Cypherpunks repositories - gostls13.git/commit
exec: new API, replace Run with Command
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 1 Jun 2011 22:26:53 +0000 (15:26 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 1 Jun 2011 22:26:53 +0000 (15:26 -0700)
commitf259f6ba0adfa0b98e74b27dbe6013d012a037eb
treef180aad60f74af96b5437c798123c83fab63da8a
parent2132a7f575cba670eeffde495c0bb2df120c2c5b
exec: new API, replace Run with Command

This removes exec.Run and replaces exec.Cmd with a
new implementation. The new exec.Cmd represents
both a currently-running command and also a command
being prepared. It has a good zero value.

You can Start + Wait on a Cmd, or simply Run it.
Start (and Run) deal with copying stdout, stdin,
and stderr between the Cmd's io.Readers and
io.Writers.

There are convenience methods to capture a command's
stdout and/or stderr.

R=r, n13m3y3r, rsc, gustavo, alex.brainman, dsymonds, r, adg, duzy.chan, mike.rosset, kevlar
CC=golang-dev
https://golang.org/cl/4552052
misc/dashboard/builder/exec.go
misc/goplay/goplay.go
src/cmd/gofix/main.go
src/cmd/gofmt/gofmt.go
src/cmd/goinstall/main.go
src/cmd/hgpatch/main.go
src/pkg/exec/exec.go
src/pkg/exec/exec_test.go
src/pkg/go/types/gcimporter_test.go
src/pkg/http/cgi/host.go
src/pkg/http/cgi/host_test.go