summaryrefslogtreecommitdiff
path: root/src/pkg/go/printer/testdata/comments.golden
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-03-25 16:59:02 -0700
committerRobert Griesemer <gri@golang.org>2010-03-25 16:59:02 -0700
commita7ba5ea961d70c0ef72808db9bd1917139a83ab1 (patch)
tree9eda10a0d1b69d2c235961178fcbefca22dfcfec /src/pkg/go/printer/testdata/comments.golden
parent6cfd9149401affe6725a11e737f2cd3dcd1908a2 (diff)
downloadgolang-a7ba5ea961d70c0ef72808db9bd1917139a83ab1.tar.gz
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 http://codereview.appspot.com/758041
Diffstat (limited to 'src/pkg/go/printer/testdata/comments.golden')
-rw-r--r--src/pkg/go/printer/testdata/comments.golden11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/pkg/go/printer/testdata/comments.golden b/src/pkg/go/printer/testdata/comments.golden
index f216b0b64..4c9f71d95 100644
--- a/src/pkg/go/printer/testdata/comments.golden
+++ b/src/pkg/go/printer/testdata/comments.golden
@@ -411,7 +411,8 @@ func _() {
// Some interesting interspersed comments
-func _( /* this */ x /* is */ /* an */ int) {}
+func _( /* this */ x /* is */ /* an */ int) {
+}
func _( /* no params */ ) {}
@@ -421,7 +422,13 @@ func _() {
func ( /* comment1 */ T /* comment2 */ ) _() {}
-func _() { /* one-liner */ }
+func _() { /* one-liner */
+}
+
+func _() {
+ _ = 0
+ /* closing curly brace should be on new line */
+}
// Line comments with tabs