(msg string, allowedNames, allowedTypes, usedNames, usedTypes map[string]bool)
| 246 | ) |
| 247 | |
| 248 | func 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 | |
| 273 | func diffKeys(all, used map[string]bool) []string { |
| 274 | var obsolete []string |
no outgoing calls
no test coverage detected
searching dependent graphs…