Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
tested encoders
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Solender committed Feb 4, 2020
1 parent 76c4ae4 commit 509937a
Show file tree
Hide file tree
Showing 8 changed files with 785 additions and 292 deletions.
18 changes: 18 additions & 0 deletions encoding/encoding_v1/decoderV1_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package encoding_v1

import (
"testing"
)

func TestDecoder_read(t *testing.T) {
//req := require.New(t)
//
//conn := mock_conn.NewConn()
//
//decoder := &DecoderV1{
// r: conn.Client,
// buf: &bytes.Buffer{},
//}

//
}
3 changes: 0 additions & 3 deletions encoding/encoding_v1/encoderV1.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ func (e EncoderV1) Write(p []byte) (n int, err error) {
func (e EncoderV1) flush() error {
length := e.buf.Len()
if length > 0 {
if length == 23 {
length = 24
}
if err := binary.Write(e.w, binary.BigEndian, uint16(length)); err != nil {
return errors.Wrap(err, "An error occured writing length bytes during flush")
}
Expand Down
Loading

0 comments on commit 509937a

Please sign in to comment.