From 1e86faea1bfe0f1293b97a1ef9774d47e21c27f7 Mon Sep 17 00:00:00 2001 From: storyicon Date: Wed, 13 Oct 2021 13:43:13 +0800 Subject: [PATCH] fix(protoc-gen-go-errors): fix the camel case bug of name (#1544) Signed-off-by: storyicon --- 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 76222acc9..909690d66 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)