From b2aa849c1e7b040c67a60164a01c8c6e8e1dbd47 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 28 Dec 2020 15:51:10 +0300 Subject: [PATCH] fixup for never micro codec changes Signed-off-by: Vasiliy Tolstov --- codec.go | 6 +++--- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/codec.go b/codec.go index 08edfb5..94412d6 100644 --- a/codec.go +++ b/codec.go @@ -55,11 +55,11 @@ func (w wrapGrpcCodec) Unmarshal(d []byte, v interface{}) error { return w.Codec.Unmarshal(d, v) } -func (g *wrapGrpcCodec) ReadHeader(conn io.ReadWriter, m *codec.Message, mt codec.MessageType) error { +func (g *wrapGrpcCodec) ReadHeader(conn io.Reader, m *codec.Message, mt codec.MessageType) error { return nil } -func (g *wrapGrpcCodec) ReadBody(conn io.ReadWriter, v interface{}) error { +func (g *wrapGrpcCodec) ReadBody(conn io.Reader, v interface{}) error { // caller has requested a frame switch m := v.(type) { case *codec.Frame: @@ -69,7 +69,7 @@ func (g *wrapGrpcCodec) ReadBody(conn io.ReadWriter, v interface{}) error { return codec.ErrInvalidMessage } -func (g *wrapGrpcCodec) Write(conn io.ReadWriter, m *codec.Message, v interface{}) error { +func (g *wrapGrpcCodec) Write(conn io.Writer, m *codec.Message, v interface{}) error { // if we don't have a body if v != nil { b, err := g.Marshal(v) diff --git a/go.mod b/go.mod index dd01063..99cca90 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.15 require ( github.com/golang/protobuf v1.4.3 github.com/google/go-cmp v0.5.1 // indirect - github.com/unistack-org/micro/v3 v3.0.2-0.20201215085205-f14efa64f09f + github.com/unistack-org/micro/v3 v3.0.2-0.20201220205329-e6f870bda71a golang.org/x/net v0.0.0-20200904194848-62affa334b73 golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 // indirect golang.org/x/text v0.3.3 // indirect diff --git a/go.sum b/go.sum index a717ab3..ee534c6 100644 --- a/go.sum +++ b/go.sum @@ -237,6 +237,8 @@ github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4 github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/unistack-org/micro/v3 v3.0.2-0.20201215085205-f14efa64f09f h1:jrFuYrQQuSGgODMWE2mwiUjeLxbUDrAQtGjVAnN4PUU= github.com/unistack-org/micro/v3 v3.0.2-0.20201215085205-f14efa64f09f/go.mod h1:0DgOy4OdJxQCDER8YSKitZugd2+1bddrRSNfeooTHDc= +github.com/unistack-org/micro/v3 v3.0.2-0.20201220205329-e6f870bda71a h1:S3KGfUO9LttJMvakfFZgd1bLz8XY2Z7X0DYLdgDDhXY= +github.com/unistack-org/micro/v3 v3.0.2-0.20201220205329-e6f870bda71a/go.mod h1:0DgOy4OdJxQCDER8YSKitZugd2+1bddrRSNfeooTHDc= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=