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

Issue 5649063: flag: adds DurationDef, which uses time.ParseDuration f...

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by Sam
Modified:
12 years, 2 months ago
Reviewers:
dsymonds, r2
CC:
golang-dev
Visibility:
Public.

Description

flag: adds DurationDef, which uses time.ParseDuration for defaults (instead of requiring an explicit time.Duration value)

Patch Set 1 #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -9 lines) Patch
M src/pkg/flag/flag.go View 1 2 chunks +38 lines, -0 lines 0 comments Download
M src/pkg/flag/flag_test.go View 1 3 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 4
Sam
An alternative might be to rename the current Duration to DurationRaw. I can't think of ...
12 years, 2 months ago (2012-02-11 03:09:57 UTC) #1
r2
No, thanks. We're too close to Go 1 but I wouldn't be in favor anyway. ...
12 years, 2 months ago (2012-02-11 03:27:50 UTC) #2
dsymonds
This isn't worth it. Writing "10s" is shorter than 10*time.Second, but the former is only ...
12 years, 2 months ago (2012-02-11 03:30:00 UTC) #3
Sam
12 years, 2 months ago (2012-02-11 03:38:08 UTC) #4
All right.

On Sat, Feb 11, 2012 at 14:30, David Symonds <dsymonds@golang.org> wrote:
> This isn't worth it. Writing "10s" is shorter than 10*time.Second, but
> the former is only checked at runtime, whereas the latter is checked
> at compile time. Inflating the API for such a trivial gain is bad.
>
>
> Dave.
Sign in to reply to this message.

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