Descriptiongo/printer: stricter formatting in struct declarations
If a sequence of fields don't all have the same kinds of elements (eg: Names, Types, Tags, Comments), then go fmt (and other uses of go/printer) can align different elements in different lines in the same column. This change fixes the issue by forcing each element type into it's own column unconditionally.
Fixes issue 7199.
NOTES: This CL currently exists as a proof of concept for the new format. Before this code can be merged, the tests need to be updated, or the code needs to be altered, as two existing tests in go/printer currently fail. Also gri is considering to fix the issue himself, so mail/review is pending.
Patch Set 1 #Patch Set 2 : diff -r 0ba5ecac8038 http://code.google.com/p/go #Patch Set 3 : diff -r 0ba5ecac8038 http://code.google.com/p/go #Patch Set 4 : code review 56360043: go/printer: stricter formatting in struct declarations #MessagesTotal messages: 1
|