reflect:documentation for IsValid and IsZero is confusing #34152
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/GYF3SFr7z77
What did you expect to see?
For a zero value,
value.IsZero() = true , and
value.IsValid() = false
according to the documentation here: https://golang.org/pkg/reflect/#Value.IsValid
What did you see instead?
value.IsZero() = true
value.IsValid() = true
The text was updated successfully, but these errors were encountered: