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

Function goUnionFieldMarshalIsSet

scripts/codegen/go.ts:2441–2446  ·  view source on GitHub ↗
(fieldName: string, fieldType: string, ctx: GoCodegenCtx)

Source from the content-addressed store, hash-verified

2439}
2440
2441function goUnionFieldMarshalIsSet(fieldName: string, fieldType: string, ctx: GoCodegenCtx): string {
2442 if (goTypeIsNilable(fieldType, ctx)) {
2443 return `r.${fieldName} != nil`;
2444 }
2445 return "true";
2446}
2447
2448function goUnionFieldUnmarshalType(fieldType: string): string {
2449 if (goTypeIsPointer(fieldType)) {

Callers 1

emitGoUnionWrapperStructFunction · 0.85

Calls 1

goTypeIsNilableFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…