printProblems lists what the schema checks found, request by request.
(w io.Writer, requests []loggedRequest)
| 148 | |
| 149 | // printProblems lists what the schema checks found, request by request. |
| 150 | func printProblems(w io.Writer, requests []loggedRequest) { |
| 151 | header := false |
| 152 | for _, e := range requests { |
| 153 | for _, group := range problemGroups(e) { |
| 154 | if !header { |
| 155 | fmt.Fprintln(w, "--- schema problems") |
| 156 | header = true |
| 157 | } |
| 158 | fmt.Fprintf(w, "%d. %s: %s\n", e.Seq, displayName(e), group.label) |
| 159 | fmt.Fprint(w, indentProblems(group.problems, " ", maxShownProblems)) |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | // problemGroup is one kind of schema problem found for a request. |
| 165 | type problemGroup struct { |
no test coverage detected