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

Function splitGoIdentifierWords

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

Source from the content-addressed store, hash-verified

164}
165
166function splitGoIdentifierWords(name: string): string[] {
167 return name
168 .replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2")
169 .replace(/([a-z0-9])([A-Z])/g, "$1_$2")
170 .split(/[^A-Za-z0-9]+/)
171 .filter((word) => word.length > 0);
172}
173
174function isStringEnumDefinition(definition: JSONSchema7): definition is JSONSchema7 & { enum: string[] } {
175 return Array.isArray(definition.enum) && definition.enum.every((value) => typeof value === "string");

Callers 3

toGoSchemaTypeNameFunction · 0.85
toGoFieldNameFunction · 0.85
goEnumConstSuffixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…