Skip to content

Commit

Permalink
flag: improve comment for calling String with zero value
Browse files Browse the repository at this point in the history
Update golang#16694.

Change-Id: Id6be1535d8a146b3dac3bee429ce407a51272032
Reviewed-on: https://go-review.googlesource.com/27634
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Rob Pike <[email protected]>
  • Loading branch information
ianlancetaylor committed Aug 23, 2016
1 parent 78fac02 commit 8050782
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/flag/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8050782

Please sign in to comment.