MCPcopy Create free account
hub / github.com/github/copilot-sdk / goUnionFieldUnmarshalAssignment

Function goUnionFieldUnmarshalAssignment

scripts/codegen/go.ts:2455–2460  ·  view source on GitHub ↗
(typeName: string, fieldName: string, fieldType: string)

Source from the content-addressed store, hash-verified

2453}
2454
2455function goUnionFieldUnmarshalAssignment(typeName: string, fieldName: string, fieldType: string): string {
2456 if (goTypeIsPointer(fieldType)) {
2457 return `*r = ${typeName}{${fieldName}: &value}`;
2458 }
2459 return `*r = ${typeName}{${fieldName}: value}`;
2460}
2461
2462function goPrimitiveSchemaTypeName(schema: JSONSchema7, ctx: GoCodegenCtx): string | undefined {
2463 const resolved = resolveSchema(schema, ctx.definitions) ?? schema;

Callers 1

emitGoUnionWrapperStructFunction · 0.85

Calls 1

goTypeIsPointerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…