Return a single byte if byte get called
This commit is contained in:
1 parent
2fbcfd8824
commit
7f94bd09ae
1 file changed
+2
@@ -114,6 +114,8 @@ func (val *Value) Str() string {
|
||||
func (val *Value) Bytes() []byte {
|
||||
if a, ok := val.Val.([]byte); ok {
|
||||
return a
|
||||
} else if s, ok := val.Val.(byte); ok {
|
||||
return []byte{s}
|
||||
}
|
||||
|
||||
return []byte{}
|
||||
|
||||
Reference in new issue
Block a user