fix template error

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-01-19 12:48:05 +03:00
parent bd881473cb
commit 36030fa440
2 changed files with 4 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ func Register(r *chi.Mux, h interface{}, eps []*micro_api.Endpoint) error {
return fmt.Errorf("invalid handler: %#+v", m.Interface())
}
for _, method := range ep.Method {
r.With(middleware.Value(routeKey{}, ep.Name)).MethodFunc(method, ep.Path[0], rh)
r.With(middleware.WithValue(routeKey{}, ep.Name)).MethodFunc(method, ep.Path[0], rh)
}
}
return nil