From b0834b5ea2cc17468c928c2e611dc2b9c0a4595e Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 16 Jul 2015 14:30:15 +1000 Subject: [PATCH] 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 --- src/flag/flag.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flag/flag.go b/src/flag/flag.go index cf6af4e946..3abc80e9c6 100644 --- a/src/flag/flag.go +++ b/src/flag/flag.go @@ -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 -- 2.50.0