Commit df8c73b2 authored by Alexey Sharov's avatar Alexey Sharov

improve null pointer panic message

parent cec151fd
.idea
.DS_Store
*.swp
*.swo
......@@ -132,6 +132,9 @@ func getFieldType(val reflect.Value) (ft int, err error) {
case reflect.String:
ft = TypeCharField
default:
if elm == nil {
panic(fmt.Errorf("%s is nil pointer, may be miss setting tag", val))
}
switch elm.Interface().(type) {
case sql.NullInt64:
ft = TypeBigIntegerField
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment