reflect,doc: use "the" instead of "a" in IsZero docs

There is a subtle distinction between a value
*being* the zero value vs being *equal to* the zero value.
This was discussed at length in #31450.

Using "a zero value" in the docs suggests that there may
be more than zero value. That is possible on the "equal to
zero value" reading, but not the "is zero" reading that we
selected for the semantics of IsZero.

This change attempts to prevent any confusion on this front by
switching to "the zero value" in the documentation.

And while we're here, eliminate a double-space.
(Darn macbook keyboards.)

Change-Id: Iaa02ba297438793f5a90be9919a4d53baef92f8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/182617
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2019-06-17 12:57:40 -07:00
parent bc27b64dba
commit 52572afa20
2 changed files with 3 additions and 3 deletions

View file

@ -1076,7 +1076,7 @@ func (v Value) IsValid() bool {
return v.flag != 0
}
// IsZero reports whether v is a zero value for its type.
// IsZero reports whether v is the zero value for its type.
// It panics if the argument is invalid.
func (v Value) IsZero() bool {
switch v.kind() {