(name string, initUpper bool)
| 97 | } |
| 98 | |
| 99 | func toCamelInitCase(name string, initUpper bool) string { |
| 100 | out := "" |
| 101 | for i, p := range strings.Split(name, "_") { |
| 102 | if !initUpper && i == 0 { |
| 103 | out += p |
| 104 | continue |
| 105 | } |
| 106 | if p == "id" { |
| 107 | out += "ID" |
| 108 | } else { |
| 109 | out += strings.Title(p) |
| 110 | } |
| 111 | } |
| 112 | return out |
| 113 | } |
| 114 | |
| 115 | func toJsonCamelCase(name string, idUppercase bool) string { |
| 116 | out := "" |
no outgoing calls
no test coverage detected