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:
@@ -281,6 +281,10 @@ func IsZeroValue(value any) bool {
|
||||
}
|
||||
|
||||
rv := reflect.ValueOf(value)
|
||||
if rv.Kind() == reflect.Ptr {
|
||||
rv = rv.Elem()
|
||||
}
|
||||
|
||||
if !rv.IsValid() {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user