fix(cmd/protoc-gen-go-http):part of #1430,fix cmd/protoc-gen-go-http (#1440)

pull/1423/head
Casper-Mars 3 years ago committed by GitHub
parent 73ce2941bd
commit f5339e3ea3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      cmd/protoc-gen-go-http/http.go
  2. 2
      cmd/protoc-gen-go-http/template.go
  3. 1
      hack/.lintcheck_failures

@ -177,10 +177,8 @@ func buildPathVars(method *protogen.Method, path string) (res []string) {
}
func camelCaseVars(s string) string {
var (
vars []string
subs = strings.Split(s, ".")
)
vars := make([]string, 0)
subs := strings.Split(s, ".")
for _, sub := range subs {
vars = append(vars, camelCase(sub))
}

@ -124,5 +124,5 @@ func (s *serviceDesc) execute() string {
if err := tmpl.Execute(buf, s); err != nil {
panic(err)
}
return strings.Trim(string(buf.Bytes()), "\r\n")
return strings.Trim(buf.String(), "\r\n")
}

@ -1,5 +1,4 @@
./examples
./cmd/protoc-gen-go-http
./cmd/kratos
./contrib/metrics/datadog
./contrib/config/nacos

Loading…
Cancel
Save