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

Function goPrimitiveSchemaGoType

scripts/codegen/go.ts:2473–2482  ·  view source on GitHub ↗
(schema: JSONSchema7, ctx: GoCodegenCtx)

Source from the content-addressed store, hash-verified

2471}
2472
2473function goPrimitiveSchemaGoType(schema: JSONSchema7, ctx: GoCodegenCtx): string | undefined {
2474 const resolved = resolveSchema(schema, ctx.definitions) ?? schema;
2475 switch (resolved.type) {
2476 case "boolean": return "bool";
2477 case "integer": return isIntegerSchemaBoundedToInt32(resolved) ? "int32" : "int64";
2478 case "number": return "float64";
2479 case "string": return "string";
2480 default: return undefined;
2481 }
2482}
2483
2484function goPrimitiveUnionValueName(member: JSONSchema7, ctx: GoCodegenCtx): string | undefined {
2485 const resolved = resolveGoUnionMember(member, ctx.definitions);

Callers 1

goPrimitiveUnionGoTypeFunction · 0.85

Calls 2

resolveSchemaFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…