From c70cdc9a11ffcf2b50c5b3ab7779cd5b05117f04 Mon Sep 17 00:00:00 2001 From: thinkgo <49174849+thinkgos@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:09:16 +0800 Subject: [PATCH] fix[cmd]: if enum is a word in proto file, it should be camel too. (#1618) --- cmd/protoc-gen-go-errors/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/protoc-gen-go-errors/errors.go b/cmd/protoc-gen-go-errors/errors.go index 455f91a73..684310b90 100644 --- a/cmd/protoc-gen-go-errors/errors.go +++ b/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)