Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(266)

Side by Side Diff: src/cmd/gotest/gotest.go

Issue 5448088: code review 5448088: cmd: shorten composite literal field values (Closed)
Patch Set: diff -r f91f50b96e10 https://go.googlecode.com/hg/ Created 12 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« src/cmd/goinstall/download.go ('K') | « src/cmd/goinstall/download.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "bufio" 8 "bufio"
9 "fmt" 9 "fmt"
10 "go/ast" 10 "go/ast"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 command = "bash" 312 command = "bash"
313 argv = []string{"bash", "-c", cmd} 313 argv = []string{"bash", "-c", cmd}
314 } 314 }
315 var err error 315 var err error
316 argv[0], err = exec.LookPath(argv[0]) 316 argv[0], err = exec.LookPath(argv[0])
317 if err != nil { 317 if err != nil {
318 Fatalf("can't find %s: %s", command, err) 318 Fatalf("can't find %s: %s", command, err)
319 } 319 }
320 procAttr := &os.ProcAttr{ 320 procAttr := &os.ProcAttr{
321 Env: env, 321 Env: env,
322 » » Files: []*os.File{ 322 » » Files: {
gri 2011/12/02 23:11:05 I'd leave this file alone - no real win
323 os.Stdin, 323 os.Stdin,
324 os.Stdout, 324 os.Stdout,
325 os.Stderr, 325 os.Stderr,
326 }, 326 },
327 } 327 }
328 var r, w *os.File 328 var r, w *os.File
329 if returnStdout { 329 if returnStdout {
330 r, w, err = os.Pipe() 330 r, w, err = os.Pipe()
331 if err != nil { 331 if err != nil {
332 Fatalf("can't create pipe: %s", err) 332 Fatalf("can't create pipe: %s", err)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 if err != nil { 465 if err != nil {
466 return 466 return
467 } 467 }
468 } 468 }
469 return matchRe.MatchString(str), nil 469 return matchRe.MatchString(str), nil
470 } 470 }
471 471
472 func main() { 472 func main() {
473 testing.Main(matchString, tests, benchmarks, examples) 473 testing.Main(matchString, tests, benchmarks, examples)
474 }` 474 }`
OLDNEW
« src/cmd/goinstall/download.go ('K') | « src/cmd/goinstall/download.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b