summaryrefslogtreecommitdiff
path: root/src/go/printer
Commit message (Collapse)AuthorAgeFilesLines
* go/printer: don't reduce nesting depth twice if parentheses are present ↵Robert Griesemer2014-09-125-2/+17
| | | | | | | | | | | | | around an expr No impact on formatting on our repos. Fixes issue 8021. LGTM=adonovan R=adonovan, dvyukov CC=golang-codereviews https://codereview.appspot.com/142020043
* go/printer, gofmt: don't align map entries for irregular inputsRobert Griesemer2014-09-113-7/+59
| | | | | | | | | | | | | | | | | | | | | 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 issue 8685. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/139430043
* build: move package sources from src/pkg to srcRuss Cox2014-09-0824-0/+13210
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.