]> Cypherpunks repositories - gostls13.git/commit
go/printer: fix indentation of *ast.CallExpr parameters
authorMichal Bohuslávek <mbohuslavek@gmail.com>
Wed, 26 Aug 2015 21:17:22 +0000 (23:17 +0200)
committerRobert Griesemer <gri@golang.org>
Fri, 11 Sep 2015 23:36:34 +0000 (23:36 +0000)
commitab14797f2179434575fc42dcc3c4f83e6d402e4b
treea3df4f365e07f4a751fe814e8aa7fe4a54939b81
parent67ddae87b97b14e228c09d82c9c21ca0b0eaaae9
go/printer: fix indentation of *ast.CallExpr parameters

The current version of go/printer formats the following code
like this:

foo.Bar().
Run(func() {
do()
}).
Set(map[string]interface{}{
"x": "three",
"y": 4,
}).
Run(
func() {
do()
},
)

This CL changes the go/printer behaviour to make the code look
like this.

foo.Bar().
Run(func() {
do()
}).
Set(map[string]interface{}{
"x": "three",
"y": 4,
}).
Run(
func() {
do()
},
)

Fixes #12066.

Change-Id: If0f525dae1a5d45f9ba40534dbb65715d7e8001b
Reviewed-on: https://go-review.googlesource.com/13928
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/printer/nodes.go
src/go/printer/testdata/expressions.golden
src/go/printer/testdata/expressions.input
src/go/printer/testdata/expressions.raw