mirror of
https://github.com/astaxie/beego.git
synced 2024-12-23 14:10:50 +00:00
allow unexported fields on model structs
This commit is contained in:
parent
50bc1ef757
commit
4785ac14d7
@ -43,6 +43,9 @@ func newModelInfo(val reflect.Value) (info *modelInfo) {
|
|||||||
for i := 0; i < ind.NumField(); i++ {
|
for i := 0; i < ind.NumField(); i++ {
|
||||||
field := ind.Field(i)
|
field := ind.Field(i)
|
||||||
sf = ind.Type().Field(i)
|
sf = ind.Type().Field(i)
|
||||||
|
if sf.PkgPath != "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
fi, err = newFieldInfo(info, field, sf)
|
fi, err = newFieldInfo(info, field, sf)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user