99c03a2b by astaxie

fix the nil judge

1 parent b1b4dbb0
...@@ -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) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!