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

Issue 5331045: code review 5331045: fmt: handle os.Error values (Closed)

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

Description

fmt: handle os.Error values Handling os.Error is no different than handling fmt.Stringer here, so the code is redundant now, but it will be necessary once error goes in. Adding it now will make gofix fix it.

Patch Set 1 #

Patch Set 2 : diff -r eb6fbf796acc https://go.googlecode.com/hg #

Patch Set 3 : diff -r eb6fbf796acc https://go.googlecode.com/hg #

Total comments: 1

Patch Set 4 : diff -r 3366bca204a1 https://go.googlecode.com/hg #

Total comments: 2

Patch Set 5 : diff -r 3366bca204a1 https://go.googlecode.com/hg #

Patch Set 6 : diff -r 70ad052c7247 https://go.googlecode.com/hg #

Patch Set 7 : diff -r 70ad052c7247 https://go.googlecode.com/hg #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -6 lines) Patch
M src/pkg/fmt/doc.go View 1 2 3 4 5 6 1 chunk +7 lines, -3 lines 0 comments Download
M src/pkg/fmt/print.go View 1 2 3 4 5 6 1 chunk +14 lines, -3 lines 0 comments Download

Messages

Total messages: 7
rsc
Hello r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
13 years, 9 months ago (2011-10-28 01:42:56 UTC) #1
r
http://codereview.appspot.com/5331045/diff/3/src/pkg/fmt/print.go File src/pkg/fmt/print.go (right): http://codereview.appspot.com/5331045/diff/3/src/pkg/fmt/print.go#newcode646 src/pkg/fmt/print.go:646: p.printField(err.String(), verb, plus, false, depth) the duplication is avoidable. ...
13 years, 9 months ago (2011-10-28 03:16:28 UTC) #2
rsc
Hello r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-10-28 03:24:53 UTC) #3
rsc
I added doc.go to this CL and swapped the order. The duplication is less avoidable ...
13 years, 9 months ago (2011-10-28 03:26:06 UTC) #4
r
LGTM but how about a type switch? http://codereview.appspot.com/5331045/diff/9001/src/pkg/fmt/doc.go File src/pkg/fmt/doc.go (right): http://codereview.appspot.com/5331045/diff/9001/src/pkg/fmt/doc.go#newcode92 src/pkg/fmt/doc.go:92: If an ...
13 years, 9 months ago (2011-10-28 04:07:24 UTC) #5
rsc
On Thu, Oct 27, 2011 at 21:07, <r@golang.org> wrote: > LGTM > but how about ...
13 years, 9 months ago (2011-10-28 04:13:31 UTC) #6
rsc
13 years, 9 months ago (2011-10-28 04:20:49 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=f960102bc23f ***

fmt: handle os.Error values

Handling os.Error is no different than handling fmt.Stringer
here, so the code is redundant now, but it will be necessary
once error goes in.

Adding it now will make gofix fix it.

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

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