From 881d6064d23d9da5c7ff368bc7d41d271290deff Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 15 Dec 2009 15:27:16 -0800 Subject: 1) Change default gofmt default settings for parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 2nd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/179067 --- src/pkg/exec/exec_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/pkg/exec/exec_test.go') diff --git a/src/pkg/exec/exec_test.go b/src/pkg/exec/exec_test.go index 5a997fd19..9c4d2ee31 100644 --- a/src/pkg/exec/exec_test.go +++ b/src/pkg/exec/exec_test.go @@ -5,20 +5,20 @@ package exec import ( - "io"; - "io/ioutil"; - "testing"; + "io" + "io/ioutil" + "testing" ) func TestRunCat(t *testing.T) { cmd, err := Run("/bin/cat", []string{"cat"}, nil, - Pipe, Pipe, DevNull); + Pipe, Pipe, DevNull) if err != nil { t.Fatalf("opencmd /bin/cat: %v", err) } - io.WriteString(cmd.Stdin, "hello, world\n"); - cmd.Stdin.Close(); - buf, err := ioutil.ReadAll(cmd.Stdout); + io.WriteString(cmd.Stdin, "hello, world\n") + cmd.Stdin.Close() + buf, err := ioutil.ReadAll(cmd.Stdout) if err != nil { t.Fatalf("reading from /bin/cat: %v", err) } @@ -32,11 +32,11 @@ func TestRunCat(t *testing.T) { func TestRunEcho(t *testing.T) { cmd, err := Run("/bin/echo", []string{"echo", "hello", "world"}, nil, - DevNull, Pipe, DevNull); + DevNull, Pipe, DevNull) if err != nil { t.Fatalf("opencmd /bin/echo: %v", err) } - buf, err := ioutil.ReadAll(cmd.Stdout); + buf, err := ioutil.ReadAll(cmd.Stdout) if err != nil { t.Fatalf("reading from /bin/echo: %v", err) } -- cgit v1.2.3