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

Function goTypeIsNilable

scripts/codegen/go.ts:375–379  ·  view source on GitHub ↗
(goType: string | undefined, ctx?: GoCodegenCtx)

Source from the content-addressed store, hash-verified

373}
374
375function goTypeIsNilable(goType: string | undefined, ctx?: GoCodegenCtx): boolean {
376 if (!goType) return false;
377 if (goTypeIsPointer(goType) || goTypeIsSlice(goType) || goTypeIsMap(goType)) return true;
378 return ctx ? goDiscriminatedUnionInfoForType(goType, ctx) !== undefined : false;
379}
380
381function goOptionalFieldNeedsDereference(goType: string | undefined): boolean {
382 return goType === undefined || goTypeIsPointer(goType);

Callers 3

resolveGoPropertyTypeFunction · 0.85
goUnionFieldMarshalIsSetFunction · 0.85

Calls 4

goTypeIsPointerFunction · 0.85
goTypeIsSliceFunction · 0.85
goTypeIsMapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…