]> Cypherpunks repositories - gostls13.git/commit
go/printer, gofmt: don't write too many newlines
authorRobert Griesemer <gri@golang.org>
Thu, 15 Dec 2011 21:51:47 +0000 (13:51 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 15 Dec 2011 21:51:47 +0000 (13:51 -0800)
commit9f65e99ad4bdc85e979f12fb5e4d7f4e4b8a7693
treedc22d5dd68d6d654688e46c889d5e8e7821aad6f
parent52c8107a3c68245bccc836a0003fea1dcead450a
go/printer, gofmt: don't write too many newlines

In some rare cases, gofmt would accept more than the maximum
number of empty lines (1) between source code snippets.

The actual change is in printer.go, lines 773-775; the rest
is some minor restructuring.

Applied gofmt -w src misc .

Fixes #2387.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5496047
src/cmd/cgo/godefs.go
src/pkg/bytes/buffer_test.go
src/pkg/go/printer/nodes.go
src/pkg/go/printer/printer.go
src/pkg/go/printer/testdata/statements.golden