fix the nil judge
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -131,7 +131,7 @@ func getFieldType(val reflect.Value) (ft int, err error) { | ... | @@ -131,7 +131,7 @@ func getFieldType(val reflect.Value) (ft int, err error) { |
| 131 | case reflect.String: | 131 | case reflect.String: |
| 132 | ft = TypeCharField | 132 | ft = TypeCharField |
| 133 | default: | 133 | default: |
| 134 | if elm.IsNil() { | 134 | if elm.Interface() == nil { |
| 135 | panic(fmt.Errorf("%s is nil pointer, may be miss setting tag", val)) | 135 | panic(fmt.Errorf("%s is nil pointer, may be miss setting tag", val)) |
| 136 | } | 136 | } |
| 137 | switch elm.Interface().(type) { | 137 | switch elm.Interface().(type) { | ... | ... |
-
Please register or sign in to post a comment