(value interface{}, field string)
| 1009 | } |
| 1010 | |
| 1011 | func fieldExists(value interface{}, field string) bool { |
| 1012 | element := reflect.ValueOf(value).Elem() |
| 1013 | |
| 1014 | for i := 0; i < element.NumField(); i++ { |
| 1015 | if strings.ToLower(element.Type().Field(i).Name) == strings.ToLower(field) { |
| 1016 | return true |
| 1017 | } |
| 1018 | } |
| 1019 | |
| 1020 | return false |
| 1021 | } |
| 1022 | |
| 1023 | func printField(value interface{}, field string) { |
| 1024 | var matchFunc = func(structField string) bool { |
no outgoing calls
no test coverage detected