Include ignored fields
This commit is contained in:
		
							parent
							
								
									41e397da8c
								
							
						
					
					
						commit
						857d1416f6
					
				| @ -18,6 +18,7 @@ type ( | |||||||
| 		Value      interface{} `json:"value"` | 		Value      interface{} `json:"value"` | ||||||
| 		IsRequired bool        `json:"is_required"` | 		IsRequired bool        `json:"is_required"` | ||||||
| 		IsReadonly bool        `json:"is_readonly"` | 		IsReadonly bool        `json:"is_readonly"` | ||||||
|  | 		IsIgnored  bool        `json:"is_ignored"` | ||||||
| 		Title      string      `json:"title"` | 		Title      string      `json:"title"` | ||||||
| 		Options    []string    `json:"options"` | 		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())) | 		panic(fmt.Errorf("Config is expected to be a Struct, not %s", ckind.String())) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| loop_over_fields: |  | ||||||
| 	for i := 0; i < cval.NumField(); i++ { | 	for i := 0; i < cval.NumField(); i++ { | ||||||
| 		var ( | 		var ( | ||||||
| 			field = ctyp.Field(i) | 			field = ctyp.Field(i) | ||||||
| @ -95,7 +95,7 @@ loop_over_fields: | |||||||
| 					cf.IsReadonly = true | 					cf.IsReadonly = true | ||||||
| 				} | 				} | ||||||
| 				if attr == aIgnored { | 				if attr == aIgnored { | ||||||
| 					continue loop_over_fields | 					cf.IsIgnored = true | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user