MCPcopy Create free account
hub / github.com/cli/cli / camelCase

Function camelCase

pkg/cmd/project/shared/queries/queries.go:1841–1849  ·  view source on GitHub ↗

camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys.

(s string)

Source from the content-addressed store, hash-verified

1839
1840// camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys.
1841func camelCase(s string) string {
1842 if len(s) == 0 {
1843 return ""
1844 }
1845 if len(s) == 1 {
1846 return strings.ToLower(s)
1847 }
1848 return strings.ToLower(s[0:1]) + s[1:]
1849}
1850
1851type exportable interface {
1852 ExportData([]string) map[string]interface{}

Callers 2

TestCamelCaseFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCamelCaseFunction · 0.68