diff --git a/plugins/pluginrpc-gen/template.go b/plugins/pluginrpc-gen/template.go index 704030c..d3dc494 100644 --- a/plugins/pluginrpc-gen/template.go +++ b/plugins/pluginrpc-gen/template.go @@ -42,10 +42,17 @@ var templFuncs = template.FuncMap{ "marshalType": marshalType, "isErr": isErr, "lower": strings.ToLower, - "title": strings.Title, + "title": title, "tag": buildTag, } +func title(s string) string { + if strings.ToLower(s) == "id" { + return "ID" + } + return strings.Title(s) +} + var generatedTempl = template.Must(template.New("rpc_cient").Funcs(templFuncs).Parse(` // generated code - DO NOT EDIT {{ range $k, $v := .BuildTags }}