Skip to content
Snippets Groups Projects
Commit 541b67d0 authored by Robert Griesemer's avatar Robert Griesemer
Browse files

go/printer, gofmt: fine tuning of line spacing

- no empty lines inside empty structs and interfaces
- top-level declarations are separated by a blank line if
  a) they are of different kind (e.g. const vs type); or
  b) there are documentation comments associated with a
     declaration (this is new)
- applied gofmt -w misc src

The actual changes are in go/printer/nodes.go:397-400 (empty structs/interfaces),
and go/printer/printer.go:307-309 (extra line break). The remaining
changes are cleanups w/o changing the existing functionality.

Fixes issue  2570.

R=rsc
CC=golang-dev
https://golang.org/cl/5493057
parent 72bdd868
No related branches found
No related tags found
No related merge requests found
Showing
with 122 additions and 22 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment