allow unexported fields on model structs

This commit is contained in:
Kyle McCullough 2014-03-18 18:00:07 -05:00 committed by astaxie
parent b6d63c84ae
commit 52817fb668
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ func newModelInfo(val reflect.Value) (info *modelInfo) {
for i := 0; i < ind.NumField(); i++ {
field := ind.Field(i)
sf = ind.Type().Field(i)
if sf.PkgPath != "" {
continue
}
fi, err = newFieldInfo(info, field, sf)
if err != nil {