unionNames lists request names from both runs, in the order first seen.
(a, b []loggedRequest)
| 420 | |
| 421 | // unionNames lists request names from both runs, in the order first seen. |
| 422 | func unionNames(a, b []loggedRequest) []string { |
| 423 | seen := map[string]bool{} |
| 424 | var names []string |
| 425 | for _, list := range [][]loggedRequest{a, b} { |
| 426 | for _, e := range list { |
| 427 | name := displayName(e) |
| 428 | if !seen[name] { |
| 429 | seen[name] = true |
| 430 | names = append(names, name) |
| 431 | } |
| 432 | } |
| 433 | } |
| 434 | return names |
| 435 | } |
| 436 | |
| 437 | type requestPayload struct { |
| 438 | rawQuery, body, query, variables string |
no test coverage detected