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

Function goPrimitiveUnionVariantTypeName

scripts/codegen/go.ts:2516–2530  ·  view source on GitHub ↗
(typeName: string, valueName: string)

Source from the content-addressed store, hash-verified

2514}
2515
2516function goPrimitiveUnionVariantTypeName(typeName: string, valueName: string): string {
2517 if (typeName.endsWith("FieldValue")) {
2518 return `${typeName.slice(0, -"FieldValue".length)}${valueName}Value`;
2519 }
2520 if (typeName.endsWith("Value")) {
2521 return `${typeName.slice(0, -"Value".length)}${valueName}Value`;
2522 }
2523 if (typeName.endsWith("Result")) {
2524 return `${typeName.slice(0, -"Result".length)}${valueName}Result`;
2525 }
2526 if (typeName.endsWith("Content")) {
2527 return `${typeName.slice(0, -"Content".length)}${valueName}Content`;
2528 }
2529 return `${typeName}${valueName}`;
2530}
2531
2532function goPrimitiveUnionVariants(typeName: string, schema: JSONSchema7, ctx: GoCodegenCtx): GoPrimitiveUnionVariant[] | undefined {
2533 const members = goNonNullUnionMembers(schema);

Callers 2

goPrimitiveUnionVariantsFunction · 0.85
goUntaggedUnionVariantFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…