diff options
| author | Russ Cox <rsc@golang.org> | 2009-10-06 15:38:57 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-10-06 15:38:57 -0700 |
| commit | ecb863a9a93c0eaee18e9ea5094828d729a23024 (patch) | |
| tree | e90e7eba5ac9cb44e36429eedd8d928594482ea1 /src/pkg/exec/exec.go | |
| parent | 2c2e2c5d5582225632be487dba4ede8761374294 (diff) | |
| download | go-ecb863a9a93c0eaee18e9ea5094828d729a23024.tar.xz | |
apply gofmt to datafmt, ebnf, exec, expvar, flag, fmt
R=gri
DELTA=456 (6 added, 3 deleted, 447 changed)
OCL=35398
CL=35406
Diffstat (limited to 'src/pkg/exec/exec.go')
| -rw-r--r-- | src/pkg/exec/exec.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go index a057bdcac0..fc68561223 100644 --- a/src/pkg/exec/exec.go +++ b/src/pkg/exec/exec.go @@ -12,7 +12,7 @@ import ( // Arguments to Run. const ( - DevNull = iota; + DevNull = iota; PassThrough; Pipe; MergeWithStdout; @@ -24,10 +24,10 @@ const ( // or else nil, depending on the arguments to Run. // Pid is the running command's operating system process ID. type Cmd struct { - Stdin *os.File; - Stdout *os.File; - Stderr *os.File; - Pid int; + Stdin *os.File; + Stdout *os.File; + Stderr *os.File; + Pid int; } // Given mode (DevNull, etc), return file for child @@ -78,8 +78,7 @@ func modeToFiles(mode, fd int) (*os.File, *os.File, os.Error) { // If a parameter is Pipe, then the corresponding field (Stdin, Stdout, Stderr) // of the returned Cmd is the other end of the pipe. // Otherwise the field in Cmd is nil. -func Run(argv0 string, argv, envv []string, stdin, stdout, stderr int) (p *Cmd, err os.Error) -{ +func Run(argv0 string, argv, envv []string, stdin, stdout, stderr int) (p *Cmd, err os.Error) { p = new(Cmd); var fd [3]*os.File; @@ -184,7 +183,7 @@ func (p *Cmd) Close() os.Error { return err; } -func canExec(file string) bool{ +func canExec(file string) bool { d, err := os.Stat(file); if err != nil { return false; @@ -220,4 +219,3 @@ func LookPath(file string) (string, os.Error) { } return "", os.ENOENT; } - |
