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

pull/1622/head
thinkgo 3 years ago committed by GitHub
parent a8692e7dde
commit c70cdc9a11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/protoc-gen-go-errors/errors.go

@ -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…
Cancel
Save