• Robert Griesemer's avatar
    go/printer, gofmt: don't align map entries for irregular inputs · 724fa12f
    Robert Griesemer authored
    Details: Until now, when we saw a key:value pair that fit onto
    a single line, we assumed that it should be formatted with a
    vtab after the ':' for alignment of its value. This leads to
    odd behavior if there are more than one such pair on a line.
    This CL changes the behavior such that alignment is only used
    for the first pair on a line. This preserves existing behavior
    (in the std lib we have composite literals where the last line
    contains multiple entries and the first entry's value is aligned
    with the values on previous lines), and resolves this issue.
    
    No impact on formatting of std lib, go.tools, go.exp, go.net.
    
    Fixes #8685.
    
    LGTM=adonovan
    R=adonovan
    CC=golang-codereviews
    https://golang.org/cl/139430043
    724fa12f
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...