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/12285
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Rob Pike 2015-07-16 14:30:15 +10:00
parent 19916e453e
commit b0834b5ea2
1 changed files with 2 additions and 0 deletions

View File

@ -235,6 +235,8 @@ func (d *durationValue) String() string { return (*time.Duration)(d).String() }
// If a Value has an IsBoolFlag() bool method returning true,
// the command-line parser makes -name equivalent to -name=true
// rather than using the next command-line argument.
//
// Set is called once, in command line order, for each flag present.
type Value interface {
String() string
Set(string) error