1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

fix: IsZeroValue support pointer

This commit is contained in:
dudaodong
2023-02-06 19:36:36 +08:00
parent 9cd9d1aeb5
commit 6f2f1f3004

View File

@@ -281,6 +281,10 @@ func IsZeroValue(value any) bool {
} }
rv := reflect.ValueOf(value) rv := reflect.ValueOf(value)
if rv.Kind() == reflect.Ptr {
rv = rv.Elem()
}
if !rv.IsValid() { if !rv.IsValid() {
return true return true
} }