1
0
mirror of https://github.com/go-kratos/kratos.git synced 2026-05-22 10:15:24 +02:00

fix[cmd]: if enum is a word in proto file, it should be camel too. (#1618)

This commit is contained in:
thinkgo
2021-11-10 21:09:16 +08:00
committed by GitHub
parent a8692e7dde
commit c70cdc9a11
+1 -1
View File
@@ -94,7 +94,7 @@ func genErrorsReason(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene
func case2Camel(name string) string { func case2Camel(name string) string {
if !strings.Contains(name, "_") { if !strings.Contains(name, "_") {
return name return strings.Title(strings.ToLower(name))
} }
name = strings.ToLower(name) name = strings.ToLower(name)
name = strings.Replace(name, "_", " ", -1) name = strings.Replace(name, "_", " ", -1)