(structName string, field *ast.Field, pass *analysis.Pass, allowedTagNames, allowedTagTypes map[string]bool)
| 135 | } |
| 136 | |
| 137 | func processStructField(structName string, field *ast.Field, pass *analysis.Pass, allowedTagNames, allowedTagTypes map[string]bool) { |
| 138 | goField := field.Names[0] |
| 139 | tagValue := strings.Trim(field.Tag.Value, "`") |
| 140 | structTag := reflect.StructTag(tagValue) |
| 141 | |
| 142 | processTag(structName, goField, field, structTag, "json", pass, allowedTagNames, allowedTagTypes) |
| 143 | processTag(structName, goField, field, structTag, "url", pass, allowedTagNames, allowedTagTypes) |
| 144 | } |
| 145 | |
| 146 | func processTag(structName string, goField *ast.Ident, field *ast.Field, structTag reflect.StructTag, tagType string, pass *analysis.Pass, allowedTagNames, allowedTagTypes map[string]bool) { |
| 147 | tagName, ok := structTag.Lookup(tagType) |
no test coverage detected
searching dependent graphs…