(recentErrors []string)
| 70 | } |
| 71 | |
| 72 | func BuildErrorBlockMap(recentErrors []string) map[string][]string { |
| 73 | out := map[string][]string{} |
| 74 | for _, err := range recentErrors { |
| 75 | for keyword, blockTypes := range errorBlockPatterns { |
| 76 | if strings.Contains(err, keyword) { |
| 77 | out[keyword] = append([]string{}, blockTypes...) |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | return out |
| 82 | } |
| 83 | |
| 84 | func StripInternalElements(messages []map[string]any) []map[string]any { |
| 85 | return StripInternalElementsWithErrors(messages, nil) |