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

Function goRefTypeName

scripts/codegen/go.ts:132–144  ·  view source on GitHub ↗
(ref: string, definitions?: DefinitionCollections, currentPackage?: string)

Source from the content-addressed store, hash-verified

130}
131
132function goRefTypeName(ref: string, definitions?: DefinitionCollections, currentPackage?: string): string {
133 const externalRef = parseExternalSchemaRef(ref);
134 if (externalRef) {
135 const externalImport = EXTERNAL_SCHEMA_GO_IMPORT[externalRef.schemaFile];
136 const typeName = toGoFieldName(externalRef.definitionName);
137 if (externalImport && externalImport.packageName !== currentPackage) {
138 return `${externalImport.qualifier}.${typeName}`;
139 }
140 return typeName;
141 }
142
143 return toGoFieldName(refTypeName(ref, definitions));
144}
145
146function compareGoFieldNames(left: string, right: string): number {
147 return left.localeCompare(right);

Callers 1

resolveGoPropertyTypeFunction · 0.85

Calls 3

parseExternalSchemaRefFunction · 0.85
toGoFieldNameFunction · 0.85
refTypeNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…