Bump github.com/ugorji/go/codec

To reduce garbage from simpleIoEncWriterWriter
(https://github.com/ugorji/go/issues/143)
This commit is contained in:
Alfonso Acosta
2016-02-22 12:29:17 +00:00
parent d2bf204181
commit efeab520bc
2 changed files with 5 additions and 2 deletions

View File

@@ -141,13 +141,16 @@ type simpleIoEncWriterWriter struct {
w io.Writer
bw io.ByteWriter
sw ioEncStringWriter
bs [1]byte
}
func (o *simpleIoEncWriterWriter) WriteByte(c byte) (err error) {
if o.bw != nil {
return o.bw.WriteByte(c)
}
_, err = o.w.Write([]byte{c})
// _, err = o.w.Write([]byte{c})
o.bs[0] = c
_, err = o.w.Write(o.bs[:])
return
}