Descriptiongo/printer, go/fmt: leave "short" single-line if statements and for loops on one line
If the original 'if' or 'for' statement is spanning a single line
and is "short" enough, it will be formatted on a single line.
The feature is trivially disabled by setting oneLineStmtsEnabled = false
in go/printer/nodes.go.
No impact on existing source code under $GOROOT/src and $GOROOT/misc.
Fixes issue 4363.
Patch Set 1 #Patch Set 2 : diff -r 6d4229bb6307 https://code.google.com/p/go #Patch Set 3 : diff -r 2524ef4a77b4 https://code.google.com/p/go #Patch Set 4 : diff -r 1315abc581ed https://code.google.com/p/go #Patch Set 5 : diff -r 1315abc581ed https://code.google.com/p/go #Patch Set 6 : diff -r b26a08dc81f0 https://code.google.com/p/go #
MessagesTotal messages: 1
|