forked from mirror/gorm
Fix check length for Array, Map, Slice
This commit is contained in:
parent
e4b130d2d7
commit
1092523ce2
2
utils.go
2
utils.go
|
@ -183,7 +183,7 @@ func fileWithLineNum() string {
|
||||||
|
|
||||||
func isBlank(value reflect.Value) bool {
|
func isBlank(value reflect.Value) bool {
|
||||||
switch value.Kind() {
|
switch value.Kind() {
|
||||||
case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
|
case reflect.String:
|
||||||
return value.Len() == 0
|
return value.Len() == 0
|
||||||
case reflect.Bool:
|
case reflect.Bool:
|
||||||
return !value.Bool()
|
return !value.Bool()
|
||||||
|
|
Loading…
Reference in New Issue