update for latest micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-10-01 01:37:54 +03:00
parent 7f17a3e5b0
commit 5a63953d3f
5 changed files with 21 additions and 34 deletions

View File

@@ -31,7 +31,7 @@ type testServer struct {
func NewServerHandlerWrapper() server.HandlerWrapper {
return func(fn server.HandlerFunc) server.HandlerFunc {
return func(ctx context.Context, req server.Request, rsp interface{}) error {
//fmt.Printf("wrap ctx: %#+v req: %#+v\n", ctx, req)
// fmt.Printf("wrap ctx: %#+v req: %#+v\n", ctx, req)
return fn(ctx, req, rsp)
}
}
@@ -39,7 +39,7 @@ func NewServerHandlerWrapper() server.HandlerWrapper {
func (g *testServer) Call(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
if req.Name == "Error" {
return &errors.Error{Id: "id", Code: 99, Detail: "detail"}
return &errors.Error{ID: "id", Code: 99, Detail: "detail"}
}
rsp.Msg = "Hello " + req.Name
rsp.Broken = &pb.Broken{Field: "12345"}