From 1cc8b3750338387b78b92da51429868bcbcac266 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 21 Mar 2022 15:41:40 +0300 Subject: [PATCH] comment Signed-off-by: Vasiliy Tolstov --- http.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/http.go b/http.go index 8e99d7d..4a61dfd 100644 --- a/http.go +++ b/http.go @@ -184,14 +184,17 @@ func (h *httpServer) NewHandler(handler interface{}, opts ...server.HandlerOptio tp := reflect.TypeOf(handler) - if len(options.Metadata) == 0 { - if h.registerRPC { - h.opts.Logger.Infof(h.opts.Context, "register rpc handler for http.MethodPost %s /%s", hn, hn) - if err := hdlr.handlers.Insert([]string{http.MethodPost}, "/"+hn, pth); err != nil { - h.opts.Logger.Errorf(h.opts.Context, "cant add rpc handler for http.MethodPost %s /%s", hn, hn) + /* + if len(options.Metadata) == 0 { + if h.registerRPC { + h.opts.Logger.Infof(h.opts.Context, "register rpc handler for http.MethodPost %s /%s", hn, hn) + if err := hdlr.handlers.Insert([]string{http.MethodPost}, "/"+hn, pth); err != nil { + h.opts.Logger.Errorf(h.opts.Context, "cant add rpc handler for http.MethodPost %s /%s", hn, hn) + } } } - } + */ + for hn, md := range options.Metadata { var method reflect.Method mname := hn[strings.Index(hn, ".")+1:]