tbl: lintfix

This commit is contained in:
M. Sz 2021-02-25 12:08:02 +01:00
parent e163c40107
commit 3b8cdffe15
2 changed files with 3 additions and 4 deletions

View File

@ -230,7 +230,7 @@ func (td *TextDictionary) Marshal() []byte {
sw.PushUint16(uint16(len(value) + 1))
}
// data stream: put all data in appropiate order
// data stream: put all data in appropriate order
for key, value := range *td {
for _, i := range key {
sw.PushBytes(byte(i))

View File

@ -1,8 +1,6 @@
package d2tbl
import (
"fmt"
"testing"
)
@ -27,10 +25,11 @@ func TestTBL_Marshal(t *testing.T) {
for key, value := range *tbl {
newValue, ok := newTbl[key]
fmt.Println(newValue, value)
if !ok {
t.Fatal("string wasn't encoded to table")
}
if newValue != value {
t.Fatal("unexpected value set")
}