1
0
의 미러 https://github.com/astaxie/beego.git synced 2025-07-11 08:31:01 +00:00

fix the nil judge

This commit is contained in:
astaxie
2014-08-08 13:16:51 +08:00
부모 b1b4dbb0e4
커밋 99c03a2b9c

파일 보기

@ -131,7 +131,7 @@ func getFieldType(val reflect.Value) (ft int, err error) {
case reflect.String:
ft = TypeCharField
default:
if elm.IsNil() {
if elm.Interface() == nil {
panic(fmt.Errorf("%s is nil pointer, may be miss setting tag", val))
}
switch elm.Interface().(type) {