tlv: Added bool to primitive

Signed-off-by: Ononiwu Maureen <amaka013@gmail.com>
This commit is contained in:
Ononiwu Maureen
2023-10-05 06:12:54 +01:00
parent ad5cd9c8bb
commit 206f773a9b
4 changed files with 102 additions and 32 deletions

View File

@@ -104,6 +104,11 @@ func MakePrimitiveRecord(typ Type, val interface{}) Record {
decoder Decoder
)
switch e := val.(type) {
case *bool:
staticSize = 1
encoder = EBool
decoder = DBool
case *uint8:
staticSize = 1
encoder = EUint8