MCPcopy Create free account
hub / github.com/google/go-github / markUsedException

Function markUsedException

tools/check-structfield-settings/main.go:248–271  ·  view source on GitHub ↗
(msg string, allowedNames, allowedTypes, usedNames, usedTypes map[string]bool)

Source from the content-addressed store, hash-verified

246)
247
248func markUsedException(msg string, allowedNames, allowedTypes, usedNames, usedTypes map[string]bool) {
249 if match := nameMismatchRE.FindStringSubmatch(msg); match != nil {
250 key := match[2] + "." + match[1]
251 if allowedNames[key] {
252 usedNames[key] = true
253 }
254 return
255 }
256
257 if match := typeChangeRE.FindStringSubmatch(msg); match != nil {
258 key := match[2] + "." + match[1]
259 if allowedTypes[key] {
260 usedTypes[key] = true
261 }
262 return
263 }
264
265 if match := fieldInStructRE.FindStringSubmatch(msg); match != nil {
266 key := match[2] + "." + match[1]
267 if allowedTypes[key] {
268 usedTypes[key] = true
269 }
270 }
271}
272
273func diffKeys(all, used map[string]bool) []string {
274 var obsolete []string

Callers 1

analyzeRepoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…