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

Issue 5629043: code review 5629043: strings: add Fields example (Closed)

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

Description

strings: add Fields example

Patch Set 1 #

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

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

Total comments: 1

Patch Set 4 : diff -r 61a004522a55 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -0 lines) Patch
A src/pkg/strings/example_test.go View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 7
bradfitz
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
3 years, 3 months ago (2012-02-03 18:55:43 UTC) #1
rsc
LGTM %#v is fine; %q is shorter and maybe more interesting. Either way.
3 years, 3 months ago (2012-02-03 18:59:58 UTC) #2
r
LGTM http://codereview.appspot.com/5629043/diff/3001/src/pkg/strings/example_test.go File src/pkg/strings/example_test.go (right): http://codereview.appspot.com/5629043/diff/3001/src/pkg/strings/example_test.go#newcode14 src/pkg/strings/example_test.go:14: fmt.Printf("Fields are: %#v", strings.Fields(" foo bar baz ")) ...
3 years, 3 months ago (2012-02-03 19:08:23 UTC) #3
bradfitz
Ah, I hadn't seen %q on a []string before. That works. %#v is just my ...
3 years, 3 months ago (2012-02-03 19:15:50 UTC) #4
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=2631a7b6fb8e *** strings: add Fields example R=golang-dev, rsc, r CC=golang-dev http://codereview.appspot.com/5629043
3 years, 3 months ago (2012-02-03 19:17:59 UTC) #5
rsc
On Fri, Feb 3, 2012 at 14:15, Brad Fitzpatrick <bradfitz@golang.org> wrote: > Ah, I hadn't ...
3 years, 3 months ago (2012-02-03 19:33:58 UTC) #6
r2
3 years, 3 months ago (2012-02-03 19:39:12 UTC) #7
On 04/02/2012, at 6:33 AM, Russ Cox wrote:

> On Fri, Feb 3, 2012 at 14:15, Brad Fitzpatrick <bradfitz@golang.org> wrote:
>> Ah, I hadn't seen %q on a []string before.
> 
> For aggregates like slices and maps, the format
> filters down to the elements, so %q on a []string
> means %q on each string; %.2f on a []float64 works too.

This ain't your old C printf.

-rob

Sign in to reply to this message.

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