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:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user