fix protoc http cmd (#1079)

pull/1080/head
longxboy 4 years ago committed by GitHub
parent 4241dc8106
commit e278a4cf36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/protoc-gen-go-http/http.go

@ -78,7 +78,9 @@ func genService(gen *protogen.Plugin, file *protogen.File, g *protogen.Generated
sd.Methods = append(sd.Methods, buildMethodDesc(g, method, "POST", path))
}
}
g.P(sd.execute())
if len(sd.Methods) != 0 {
g.P(sd.execute())
}
}
func hasHTTPRule(services []*protogen.Service) bool {

Loading…
Cancel
Save