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

Function dedupe

script/ghmock/checker.go:271–281  ·  view source on GitHub ↗

dedupe drops repeated problems, keeping the first of each.

(problems []string)

Source from the content-addressed store, hash-verified

269
270// dedupe drops repeated problems, keeping the first of each.
271func dedupe(problems []string) []string {
272 seen := map[string]bool{}
273 var out []string
274 for _, p := range problems {
275 if !seen[p] {
276 seen[p] = true
277 out = append(out, p)
278 }
279 }
280 return out
281}

Callers 5

scaffoldGraphQLFunction · 0.85
addedPathsFunction · 0.85
checkGraphQLQueryFunction · 0.85
checkGraphQLResponseFunction · 0.85
restProblemsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected