From: Ian Lance Taylor Date: Tue, 23 Aug 2016 20:54:01 +0000 (-0700) Subject: flag: improve comment for calling String with zero value X-Git-Tag: go1.8beta1~1674 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8050782cba45c739bfb2cd735766879098c48d99;p=gostls13.git flag: improve comment for calling String with zero value Update #16694. Change-Id: Id6be1535d8a146b3dac3bee429ce407a51272032 Reviewed-on: https://go-review.googlesource.com/27634 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Rob Pike --- diff --git a/src/flag/flag.go b/src/flag/flag.go index 6c9b292b26..e4705f2392 100644 --- a/src/flag/flag.go +++ b/src/flag/flag.go @@ -238,7 +238,8 @@ func (d *durationValue) String() string { return (*time.Duration)(d).String() } // rather than using the next command-line argument. // // Set is called once, in command line order, for each flag present. -// String must work on the zero value of the dynamic type. +// The flag package may call the String method with a zero-valued receiver, +// such as a nil pointer. type Value interface { String() string Set(string) error