summaryrefslogtreecommitdiff
path: root/src/cmd/gofmt
diff options
context:
space:
mode:
authorNigel Tao <nigeltao@golang.org>2012-02-16 22:43:41 +1100
committerNigel Tao <nigeltao@golang.org>2012-02-16 22:43:41 +1100
commit6bfa8b30f55db5dcea576216247f82622d783a2a (patch)
treef4e413933e05d39a7766844594ceafecc9550562 /src/cmd/gofmt
parent8977172472bac45b35c5cc3a05ed4e7f26432ac7 (diff)
downloadgo-6bfa8b30f55db5dcea576216247f82622d783a2a.tar.gz
cmd, pkg/go/*: fix "go vet" warnings for go/ast and go/printer
struct literals. R=gri CC=golang-dev http://codereview.appspot.com/5653073
Diffstat (limited to 'src/cmd/gofmt')
-rw-r--r--src/cmd/gofmt/gofmt.go2
-rw-r--r--src/cmd/gofmt/long_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/gofmt/gofmt.go b/src/cmd/gofmt/gofmt.go
index 55c01beb5..8e565563e 100644
--- a/src/cmd/gofmt/gofmt.go
+++ b/src/cmd/gofmt/gofmt.go
@@ -118,7 +118,7 @@ func processFile(filename string, in io.Reader, out io.Writer, stdin bool) error
}
var buf bytes.Buffer
- err = (&printer.Config{printerMode, *tabWidth}).Fprint(&buf, fset, file)
+ err = (&printer.Config{Mode: printerMode, Tabwidth: *tabWidth}).Fprint(&buf, fset, file)
if err != nil {
return err
}
diff --git a/src/cmd/gofmt/long_test.go b/src/cmd/gofmt/long_test.go
index 1332b323a..9a589b1ba 100644
--- a/src/cmd/gofmt/long_test.go
+++ b/src/cmd/gofmt/long_test.go
@@ -37,7 +37,7 @@ func gofmt(filename string, src *bytes.Buffer) error {
}
ast.SortImports(fset, f)
src.Reset()
- return (&printer.Config{printerMode, *tabWidth}).Fprint(src, fset, f)
+ return (&printer.Config{Mode: printerMode, Tabwidth: *tabWidth}).Fprint(src, fset, f)
}
func testFile(t *testing.T, b1, b2 *bytes.Buffer, filename string) {