]> Cypherpunks repositories - gostls13.git/commitdiff
flag: improve comment for calling String with zero value
authorIan Lance Taylor <iant@golang.org>
Tue, 23 Aug 2016 20:54:01 +0000 (13:54 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 23 Aug 2016 22:07:43 +0000 (22:07 +0000)
Update #16694.

Change-Id: Id6be1535d8a146b3dac3bee429ce407a51272032
Reviewed-on: https://go-review.googlesource.com/27634
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/flag/flag.go

index 6c9b292b26d7621b831a1bd321011a33a27a9235..e4705f23925dd154f066b8ff1cb5c9990cab6972 100644 (file)
@@ -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