diff --git a/tape/types.go b/tape/types.go index 448e0cf..70ba3a2 100644 --- a/tape/types.go +++ b/tape/types.go @@ -1,6 +1,9 @@ // Package tape implements Table Pair Encoding. package tape +// TODO: in math/rand: uint is capitalized like Uint, we need to replicate that +// here + import "fmt" // encoding and decoding functions must not make any allocations @@ -31,7 +34,7 @@ type Int64 interface { ~uint64 | ~int64 } // UInt is any unsigned integer. type UInt interface { ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 } // String is any string. -type String interface { ~string } +type String interface { ~string | ~[]uint8 } // DecodeI8 decodes an 8 bit integer from the given data. func DecodeI8[T Int8](data []byte) (value T, n int, err error) {