camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys.
(s string)
| 1828 | |
| 1829 | // camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys. |
| 1830 | func camelCase(s string) string { |
| 1831 | if len(s) == 0 { |
| 1832 | return "" |
| 1833 | } |
| 1834 | if len(s) == 1 { |
| 1835 | return strings.ToLower(s) |
| 1836 | } |
| 1837 | return strings.ToLower(s[0:1]) + s[1:] |
| 1838 | } |
| 1839 | |
| 1840 | type exportable interface { |
| 1841 | ExportData([]string) map[string]any |
no outgoing calls