MCPcopy Index your code
hub / github.com/google/go-github / processStructField

Function processStructField

tools/structfield/structfield.go:137–144  ·  view source on GitHub ↗
(structName string, field *ast.Field, pass *analysis.Pass, allowedTagNames, allowedTagTypes map[string]bool)

Source from the content-addressed store, hash-verified

135}
136
137func 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
146func 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)

Callers 1

runFunction · 0.85

Calls 1

processTagFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…