codec - Allow to Write() nil body (#1905)
* codec - Allow to Write() nil body * Oops we are in v3 now
This commit is contained in:
@@ -44,6 +44,8 @@ func (c *Codec) ReadBody(b interface{}) error {
|
||||
func (c *Codec) Write(m *codec.Message, b interface{}) error {
|
||||
var v []byte
|
||||
switch vb := b.(type) {
|
||||
case nil:
|
||||
return nil
|
||||
case *Frame:
|
||||
v = vb.Data
|
||||
case *[]byte:
|
||||
|
Reference in New Issue
Block a user