in a second place: use reflect.Ptr not reflect.Pointer since the latter was added in Go 1.18
This commit is contained in:
parent
763072452f
commit
3489ea5b2e
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue