Skip to content

Commit 087190b

Browse files
andy1liHDT3213
authored andcommitted
refactor encoder: move crc64jones import and remove unnecessary LF write in WriteEnd
1 parent 1ceef5a commit 087190b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/encoder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package core
33
import (
44
"encoding/binary"
55
"fmt"
6-
"github.com/hdt3213/rdb/crc64jones"
76
"hash"
87
"io"
8+
9+
"github.com/hdt3213/rdb/crc64jones"
910
)
1011

1112
// Encoder is used to generate RDB file
@@ -233,7 +234,6 @@ func (enc *Encoder) WriteEnd() error {
233234
if err != nil {
234235
return fmt.Errorf("write crc sum failed: %v", err)
235236
}
236-
enc.writer.Write([]byte{0x0a}) // write LF
237237
enc.state = writtenEndState
238238
return nil
239239
}

0 commit comments

Comments
 (0)