]> Cypherpunks repositories - gostls13.git/commitdiff
flag: add comment stating that Set is called in sequence across the command line
authorRob Pike <r@golang.org>
Thu, 16 Jul 2015 04:30:15 +0000 (14:30 +1000)
committerRob Pike <r@golang.org>
Thu, 16 Jul 2015 05:33:47 +0000 (05:33 +0000)
No code changes.

Change-Id: I3b78b1048318a4b80747fde8cab919282fc444a8
Reviewed-on: https://go-review.googlesource.com/12285
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/flag/flag.go

index cf6af4e946c6f72e045999420cd6cf82ba94d632..3abc80e9c676ca9334a50fd69db1b9084c7158a7 100644 (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