Commit acc8d9f5 authored by Kirill Smelkov's avatar Kirill Smelkov

go/zodb/zeo: msgpack.{Encode,Decode} -> msgpack.{Marshal,Unmarshak}

Encode/decode was deprecated and removed in recent github.com/shamaton/msgpack.
parent 91085e39
...@@ -104,7 +104,7 @@ func pktEncodeM(m msg) *pktBuf { ...@@ -104,7 +104,7 @@ func pktEncodeM(m msg) *pktBuf {
// arg // arg
// it is interface{} - use shamaton/msgpack since msgp does not handle // it is interface{} - use shamaton/msgpack since msgp does not handle
// arbitrary interfaces well. // arbitrary interfaces well.
dataArg, err := msgpack.Encode(m.arg) dataArg, err := msgpack.Marshal(m.arg)
if err != nil { if err != nil {
panic(err) // all our types are expected to be supported by msgpack panic(err) // all our types are expected to be supported by msgpack
} }
...@@ -240,7 +240,7 @@ func pktDecodeM(pkb *pktBuf) (msg, error) { ...@@ -240,7 +240,7 @@ func pktDecodeM(pkb *pktBuf) (msg, error) {
if len(btail) != 0 { if len(btail) != 0 {
return m, derrf(".%d: payload has extra data after message") return m, derrf(".%d: payload has extra data after message")
} }
err = msgpack.Decode(b, &m.arg) err = msgpack.Unmarshal(b, &m.arg)
if err != nil { if err != nil {
return m, derrf(".%d: arg: %s", m.msgid, err) return m, derrf(".%d: arg: %s", m.msgid, err)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment