summaryrefslogtreecommitdiff
path: root/reflect.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2022-10-29 15:23:56 -0400
committerAlex Flint <[email protected]>2022-10-29 15:23:56 -0400
commit3489ea5b2e9aa82dab4efc5e3f48fe6171f11ddd (patch)
tree4f09f68ab87dbff2f2a40edc15ba85d38a8119be /reflect.go
parent763072452fe0127e2002e12418d3e9c10ae1b8c0 (diff)
in a second place: use reflect.Ptr not reflect.Pointer since the latter was added in Go 1.18
Diffstat (limited to 'reflect.go')
-rw-r--r--reflect.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/reflect.go b/reflect.go
index 466d65f..5d6acb3 100644
--- a/reflect.go
+++ b/reflect.go
@@ -102,7 +102,7 @@ func isExported(field string) bool {
// isZero returns true if v contains the zero value for its type
func isZero(v reflect.Value) bool {
t := v.Type()
- if t.Kind() == reflect.Pointer || t.Kind() == reflect.Slice || t.Kind() == reflect.Map || t.Kind() == reflect.Chan || t.Kind() == reflect.Interface {
+ if t.Kind() == reflect.Ptr || t.Kind() == reflect.Slice || t.Kind() == reflect.Map || t.Kind() == reflect.Chan || t.Kind() == reflect.Interface {
return v.IsNil()
}
if !t.Comparable() {