camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys.
(s string)
| 1792 | |
| 1793 | // camelCase converts a string to camelCase, which is useful for turning Go field names to JSON keys. |
| 1794 | func camelCase(s string) string { |
| 1795 | if len(s) == 0 { |
| 1796 | return "" |
| 1797 | } |
| 1798 | if len(s) == 1 { |
| 1799 | return strings.ToLower(s) |
| 1800 | } |
| 1801 | return strings.ToLower(s[0:1]) + s[1:] |
| 1802 | } |
| 1803 | |
| 1804 | type exportable interface { |
| 1805 | ExportData([]string) map[string]interface{} |
no outgoing calls