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

Function toGoUnexportedIdentifier

scripts/codegen/go.ts:118–130  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

116}
117
118function toGoUnexportedIdentifier(name: string): string {
119 const leadingSpecialCases = [
120 ...Array.from(goIdentifierCasingOverrides.values()),
121 ...Array.from(goInitialisms, (initialism) => initialism.toUpperCase()),
122 ].sort((left, right) => right.length - left.length);
123
124 const leadingSpecialCase = leadingSpecialCases.find((specialCase) => name.startsWith(specialCase));
125 if (leadingSpecialCase) {
126 return leadingSpecialCase.toLowerCase() + name.slice(leadingSpecialCase.length);
127 }
128
129 return name.charAt(0).toLowerCase() + name.slice(1);
130}
131
132function goRefTypeName(ref: string, definitions?: DefinitionCollections, currentPackage?: string): string {
133 const externalRef = parseExternalSchemaRef(ref);

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…