mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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
This commit is contained in:
parent
52c8107a3c
commit
9f65e99ad4
5 changed files with 55 additions and 54 deletions
|
|
@ -16,7 +16,6 @@ const N = 10000 // make this bigger for a larger (and slower) test
|
|||
var data string // test data for write tests
|
||||
var bytes []byte // test data; same as data but as a slice.
|
||||
|
||||
|
||||
func init() {
|
||||
bytes = make([]byte, N)
|
||||
for i := 0; i < N; i++ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue