Commit b0834b5e authored by Rob Pike's avatar Rob Pike

flag: add comment stating that Set is called in sequence across the command line

No code changes.

Change-Id: I3b78b1048318a4b80747fde8cab919282fc444a8
Reviewed-on: https://go-review.googlesource.com/12285Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
parent 19916e45
...@@ -235,6 +235,8 @@ func (d *durationValue) String() string { return (*time.Duration)(d).String() } ...@@ -235,6 +235,8 @@ func (d *durationValue) String() string { return (*time.Duration)(d).String() }
// If a Value has an IsBoolFlag() bool method returning true, // If a Value has an IsBoolFlag() bool method returning true,
// the command-line parser makes -name equivalent to -name=true // the command-line parser makes -name equivalent to -name=true
// rather than using the next command-line argument. // rather than using the next command-line argument.
//
// Set is called once, in command line order, for each flag present.
type Value interface { type Value interface {
String() string String() string
Set(string) error Set(string) error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment