MCPcopy Index your code
hub / github.com/github/copilot-sdk / removeRedundantGoJSONExistsTerms

Function removeRedundantGoJSONExistsTerms

scripts/codegen/go.ts:1427–1432  ·  view source on GitHub ↗
(terms: GoJSONMatchTerm[])

Source from the content-addressed store, hash-verified

1425}
1426
1427function removeRedundantGoJSONExistsTerms(terms: GoJSONMatchTerm[]): GoJSONMatchTerm[] {
1428 const stringPaths = new Set(terms
1429 .filter((term) => term.kind === "stringValue")
1430 .map((term) => goJSONMatchPathKey(term.path)));
1431 return terms.filter((term) => term.kind !== "propertyExists" || !stringPaths.has(goJSONMatchPathKey(term.path)));
1432}
1433
1434function goVariantTargetedMatchSpec(
1435 variant: GoDiscriminatedUnionVariant,

Callers 1

Calls 1

goJSONMatchPathKeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…