From cd8a21c074b7a364fac0e71b39f0f13ff09e7282 Mon Sep 17 00:00:00 2001 From: Gerasimos Maropoulos Date: Thu, 13 Oct 2016 04:08:45 +0300 Subject: [PATCH] Update to 4.5.3, remove unused code, zero user changes --- utils/bytes.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/utils/bytes.go b/utils/bytes.go index 0e3f1a00..c46e9bd4 100644 --- a/utils/bytes.go +++ b/utils/bytes.go @@ -2,26 +2,8 @@ package utils import ( "bytes" - "encoding/gob" ) -// SerializeBytes serializa bytes using gob encoder and returns them -func SerializeBytes(m interface{}) ([]byte, error) { - buf := new(bytes.Buffer) - enc := gob.NewEncoder(buf) - err := enc.Encode(m) - if err == nil { - return buf.Bytes(), nil - } - return nil, err -} - -// DeserializeBytes converts the bytes to an object using gob decoder -func DeserializeBytes(b []byte, m interface{}) error { - dec := gob.NewDecoder(bytes.NewBuffer(b)) - return dec.Decode(m) //no reference here otherwise doesn't work because of go remote object -} - // BufferPool implements a pool of bytes.Buffers in the form of a bounded channel. // Pulled from the github.com/oxtoacart/bpool package (Apache licensed). type BufferPool struct {