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

Issue 39150045: Add gnuflag support for []string

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by thumper
Modified:
10 years, 4 months ago
Reviewers:
mp+199576, rog
Visibility:
Public.

Description

Add gnuflag support for []string Add a StringsValue type for gnuflag parsing. This allows comma separated values to be used as a single arg, and they are split up into the []string passed in to the NewStringsValue function. https://code.launchpad.net/~thumper/juju-core/support-string-slice-args/+merge/199576 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : Add gnuflag support for []string #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -0 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
A cmd/args.go View 1 1 chunk +36 lines, -0 lines 0 comments Download
A cmd/args_test.go View 1 1 chunk +116 lines, -0 lines 1 comment Download

Messages

Total messages: 4
thumper
Please take a look.
10 years, 4 months ago (2013-12-18 22:07:01 UTC) #1
rog
Looks reasonable - some suggestions below. https://codereview.appspot.com/39150045/diff/1/cmd/args.go File cmd/args.go (right): https://codereview.appspot.com/39150045/diff/1/cmd/args.go#newcode15 cmd/args.go:15: type StringsValue struct ...
10 years, 4 months ago (2013-12-18 23:10:33 UTC) #2
thumper
Please take a look. https://codereview.appspot.com/39150045/diff/1/cmd/args.go File cmd/args.go (right): https://codereview.appspot.com/39150045/diff/1/cmd/args.go#newcode15 cmd/args.go:15: type StringsValue struct { On ...
10 years, 4 months ago (2013-12-19 09:33:00 UTC) #3
rog
10 years, 4 months ago (2013-12-19 10:57:23 UTC) #4
LGTM, thanks.
One suggestion below.

https://codereview.appspot.com/39150045/diff/10004/cmd/args_test.go
File cmd/args_test.go (right):

https://codereview.appspot.com/39150045/diff/10004/cmd/args_test.go#newcode21
cmd/args_test.go:21: func (*ArgsSuite) TestNewStringsValue(c *gc.C) {
It'd be quite nice to see at least one test that tests it as it is intended to
be used (in a FlagSet). ISTM that this test could be easily adapted to do that.
Sign in to reply to this message.

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