camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys.
(s string)
| 1839 | |
| 1840 | // camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys. |
| 1841 | func 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 | |
| 1851 | type exportable interface { |
| 1852 | ExportData([]string) map[string]interface{} |
no outgoing calls