kvs/kv/MapKvs_test.go
2023-04-18 14:24:20 +08:00

17 lines
282 B
Go

package kv
import (
"fmt"
"testing"
)
func Test_mapKvs(t *testing.T) {
kvs := CodecStore(
MapKvs(),
ByteToStringCodec,
ArrayCodec(ChainCodec(StringToByteCodec, LengthFieldCodec)),
)
_ = kvs.Put([]byte{1}, []string{"hello", "world!"})
fmt.Println(kvs.Get([]byte{1}))
}