1
0
Fork 0

Include ignored fields

This commit is contained in:
Gregory Eremin 2015-01-25 19:33:01 +07:00
parent 41e397da8c
commit 857d1416f6
1 changed files with 2 additions and 2 deletions

View File

@ -18,6 +18,7 @@ type (
Value interface{} `json:"value"`
IsRequired bool `json:"is_required"`
IsReadonly bool `json:"is_readonly"`
IsIgnored bool `json:"is_ignored"`
Title string `json:"title"`
Options []string `json:"options"`
}
@ -66,7 +67,6 @@ func (c *config) meta(prefix string) []*configField {
panic(fmt.Errorf("Config is expected to be a Struct, not %s", ckind.String()))
}
loop_over_fields:
for i := 0; i < cval.NumField(); i++ {
var (
field = ctyp.Field(i)
@ -95,7 +95,7 @@ loop_over_fields:
cf.IsReadonly = true
}
if attr == aIgnored {
continue loop_over_fields
cf.IsIgnored = true
}
}