]> Cypherpunks repositories - gostls13.git/commit
godoc: don't convert multi-line functions into one-liners by default
authorRobert Griesemer <gri@golang.org>
Thu, 25 Mar 2010 23:59:02 +0000 (16:59 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 25 Mar 2010 23:59:02 +0000 (16:59 -0700)
commit6358e1faf6be512a8d1c20d26675975c0daa1fe0
treec1f1345326bda0e868be7ced64c5d8c830cf1825
parentc93273c0f594317914616aab2cc6ed42b8cff1ad
godoc: don't convert multi-line functions into one-liners by default

- new heuristic: if both the opening { and closing } braces are on the
  same line, and the function body doesn't contain comments or is other-
  wise too long (e.g. signature too long), it is formatted as a one-line
  function

- related cleanups along the way

- gofmt -w src misc led to no additional changes as expected

R=rsc, rsc1
CC=golang-dev, ken2, r
https://golang.org/cl/758041
src/pkg/go/printer/nodes.go
src/pkg/go/printer/printer.go
src/pkg/go/printer/testdata/comments.golden
src/pkg/go/printer/testdata/comments.input
src/pkg/go/printer/testdata/declarations.golden
src/pkg/go/printer/testdata/declarations.input
src/pkg/go/printer/testdata/expressions.golden
src/pkg/go/printer/testdata/expressions.input
src/pkg/go/printer/testdata/expressions.raw