mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-14 02:33:03 +02:00
fix[cmd]: if enum is a word in proto file, it should be camel too. (#1618)
This commit is contained in:
parent
a8692e7dde
commit
c70cdc9a11
@ -94,7 +94,7 @@ func genErrorsReason(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene
|
||||
|
||||
func case2Camel(name string) string {
|
||||
if !strings.Contains(name, "_") {
|
||||
return name
|
||||
return strings.Title(strings.ToLower(name))
|
||||
}
|
||||
name = strings.ToLower(name)
|
||||
name = strings.Replace(name, "_", " ", -1)
|
||||
|
Loading…
Reference in New Issue
Block a user