MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / convertToStructFieldName

Function convertToStructFieldName

identity.go:386–392  ·  view source on GitHub ↗

convertToStructFieldName ensures consistent field name format by returning the Go struct field name (typically capitalized) for the given input

(fieldName string)

Source from the content-addressed store, hash-verified

384// convertToStructFieldName ensures consistent field name format by returning
385// the Go struct field name (typically capitalized) for the given input
386func convertToStructFieldName(fieldName string) string {
387 // For simple cases, just capitalize the first letter
388 if len(fieldName) > 0 {
389 return strings.ToUpper(fieldName[0:1]) + fieldName[1:]
390 }
391 return fieldName
392}

Calls

no outgoing calls