summaryrefslogtreecommitdiff
path: root/src/internal/reflectlite
diff options
context:
space:
mode:
authorMarko Kungla <marko.kungla@gmail.com>2019-09-07 12:07:08 +0300
committerIan Lance Taylor <iant@golang.org>2019-09-11 00:16:10 +0000
commita5026af57c7934f0856cfd4b539a7859d85a0474 (patch)
treeeb0814237206ed18558e9745bf8ca414d4cf5470 /src/internal/reflectlite
parentb9704872d11ae224ca96a1bd2fab0da10ce806d7 (diff)
downloadgo-git-a5026af57c7934f0856cfd4b539a7859d85a0474.tar.gz
reflect: enhance docs for IsZero and IsValid
Make it clear that IsValid checks that we have valid reflect.Value and not the value of `v` fixes #34152 Change-Id: Ib3d359eeb3a82bf733b9ed17c777fc4c143bc29c Reviewed-on: https://go-review.googlesource.com/c/go/+/193841 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/internal/reflectlite')
-rw-r--r--src/internal/reflectlite/value.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/reflectlite/value.go b/src/internal/reflectlite/value.go
index 308cf98fc8..6a493938f5 100644
--- a/src/internal/reflectlite/value.go
+++ b/src/internal/reflectlite/value.go
@@ -305,7 +305,7 @@ func (v Value) IsNil() bool {
// IsValid reports whether v represents a value.
// It returns false if v is the zero Value.
// If IsValid returns false, all other methods except String panic.
-// Most functions and methods never return an invalid value.
+// Most functions and methods never return an invalid Value.
// If one does, its documentation states the conditions explicitly.
func (v Value) IsValid() bool {
return v.flag != 0