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

Issue 6822059: code review 6822059: gofmt: simplify slices of the form s[a : len(s)] to s[a:] (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by gri
Modified:
11 years, 5 months ago
Reviewers:
CC:
r, rsc, golang-dev
Visibility:
Public.

Description

gofmt: simplify slices of the form s[a : len(s)] to s[a:] Fixes issue 4314.

Patch Set 1 #

Patch Set 2 : diff -r 6f1c5f14c594 https://code.google.com/p/go #

Patch Set 3 : diff -r 6f1c5f14c594 https://code.google.com/p/go #

Patch Set 4 : diff -r 6f1c5f14c594 https://code.google.com/p/go #

Total comments: 1

Patch Set 5 : diff -r 6f1c5f14c594 https://code.google.com/p/go #

Patch Set 6 : diff -r 6f1c5f14c594 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -9 lines) Patch
M src/cmd/gofmt/gofmt_test.go View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/gofmt/simplify.go View 1 2 3 4 3 chunks +45 lines, -9 lines 0 comments Download
A src/cmd/gofmt/testdata/slices1.golden View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download
A src/cmd/gofmt/testdata/slices1.input View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download
A src/cmd/gofmt/testdata/slices2.golden View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
A src/cmd/gofmt/testdata/slices2.input View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download

Messages

Total messages: 3
gri
Hello r@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 5 months ago (2012-10-31 18:27:53 UTC) #1
r
LGTM http://codereview.appspot.com/6822059/diff/7001/src/cmd/gofmt/simplify.go File src/cmd/gofmt/simplify.go (right): http://codereview.appspot.com/6822059/diff/7001/src/cmd/gofmt/simplify.go#newcode73 src/cmd/gofmt/simplify.go:73: // unresolved "len" identifiers refers to the predefined ...
11 years, 5 months ago (2012-10-31 18:38:19 UTC) #2
gri
11 years, 5 months ago (2012-10-31 18:48:58 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=170a9dc2724e ***

gofmt: simplify slices of the form s[a : len(s)] to s[a:]

Fixes issue 4314.

R=r, rsc
CC=golang-dev
http://codereview.appspot.com/6822059
Sign in to reply to this message.

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