Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Issue 6846078: go/printer, go/fmt: put short for loops on one line (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by gri
Modified:
12 years, 8 months ago
Reviewers:
r, rsc
Visibility:
Public.

Description

go/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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -134 lines) Patch
M src/pkg/go/printer/nodes.go View 1 2 3 4 5 12 chunks +79 lines, -49 lines 0 comments Download
M src/pkg/go/printer/testdata/statements.golden View 1 2 3 4 chunks +85 lines, -82 lines 0 comments Download
M src/pkg/go/printer/testdata/statements.input View 1 2 3 2 chunks +59 lines, -3 lines 0 comments Download

Messages

Total messages: 1
gri
12 years, 8 months ago (2012-11-26 17:36:14 UTC) #1
*** Abandoned ***
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b