From 232f75a001dae4c814f7cee896478ee105f5e111 Mon Sep 17 00:00:00 2001 From: dragondriver Date: Tue, 2 Nov 2021 21:40:12 +0800 Subject: [PATCH] [skip ci] Fix golint warning of kv (#11087) Signed-off-by: dragondriver --- internal/kv/kv.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/kv/kv.go b/internal/kv/kv.go index ef5011820e..ac11dc731c 100644 --- a/internal/kv/kv.go +++ b/internal/kv/kv.go @@ -30,10 +30,12 @@ type Value interface { // StringValue type alias for string to implement Value type StringValue string +// Serialize serialize the StringValue to byte array. func (s StringValue) Serialize() []byte { return []byte(s) } +// String return the value of StringValue. func (s StringValue) String() string { return string(s) } @@ -41,10 +43,12 @@ func (s StringValue) String() string { // BytesValue type alias for byte slice to implement value type BytesValue []byte +// Serialize return the byte array. func (s BytesValue) Serialize() []byte { return s } +// String return the string of byte array. func (s BytesValue) String() string { return string(s) }