(typeName: string, valueName: string)
| 2514 | } |
| 2515 | |
| 2516 | function 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 | |
| 2532 | function goPrimitiveUnionVariants(typeName: string, schema: JSONSchema7, ctx: GoCodegenCtx): GoPrimitiveUnionVariant[] | undefined { |
| 2533 | const members = goNonNullUnionMembers(schema); |
no outgoing calls
no test coverage detected
searching dependent graphs…