MCPcopy Create free account
hub / github.com/cli/cli / unionNames

Function unionNames

script/ghmock/report.go:422–435  ·  view source on GitHub ↗

unionNames lists request names from both runs, in the order first seen.

(a, b []loggedRequest)

Source from the content-addressed store, hash-verified

420
421// unionNames lists request names from both runs, in the order first seen.
422func 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
437type requestPayload struct {
438 rawQuery, body, query, variables string

Callers 1

printDifferencesFunction · 0.85

Calls 1

displayNameFunction · 0.70

Tested by

no test coverage detected