(name string, style string)
| 52 | } |
| 53 | |
| 54 | func SetCaseStyle(name string, style string) string { |
| 55 | switch style { |
| 56 | case "camel": |
| 57 | return toCamelCase(name) |
| 58 | case "pascal": |
| 59 | return toPascalCase(name) |
| 60 | case "snake": |
| 61 | return toSnakeCase(name) |
| 62 | default: |
| 63 | panic(fmt.Sprintf("unsupported JSON tags case style: '%s'", style)) |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func SetJSONCaseStyle(name string, style string, idUppercase bool) string { |
| 68 | switch style { |
no test coverage detected