From 62923bf71abea05fd3943f9d3646a124dcf61bd9 Mon Sep 17 00:00:00 2001 From: FynnTang Date: Fri, 1 Sep 2023 11:49:25 +0800 Subject: [PATCH] feat: add Method --- protoc-gen-go-http/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protoc-gen-go-http/template.go b/protoc-gen-go-http/template.go index f8a38e2..9cf3c2c 100644 --- a/protoc-gen-go-http/template.go +++ b/protoc-gen-go-http/template.go @@ -11,7 +11,7 @@ var httpTemplate = ` {{$svrName := .ServiceName}} {{- range .MethodSets}} -const Route{{$svrType}}{{.OriginalName}} = "{{.Path}}" {{- if ne .OriginalComment ""}} {{.OriginalComment}} {{- end}} +const Route{{$svrType}}{{.OriginalName}} = "{{.Path}}" {{- if ne .OriginalComment ""}} {{.OriginalComment}} {{.Method}}{{- end}} {{- end}} type {{.ServiceType}}HTTPServer interface {