tape: Update tape.String to include ~[]byte
This commit is contained in:
parent
32df336c3e
commit
a927b9519e
@ -1,6 +1,9 @@
|
|||||||
// Package tape implements Table Pair Encoding.
|
// Package tape implements Table Pair Encoding.
|
||||||
package tape
|
package tape
|
||||||
|
|
||||||
|
// TODO: in math/rand: uint is capitalized like Uint, we need to replicate that
|
||||||
|
// here
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// encoding and decoding functions must not make any allocations
|
// encoding and decoding functions must not make any allocations
|
||||||
@ -31,7 +34,7 @@ type Int64 interface { ~uint64 | ~int64 }
|
|||||||
// UInt is any unsigned integer.
|
// UInt is any unsigned integer.
|
||||||
type UInt interface { ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 }
|
type UInt interface { ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 }
|
||||||
// String is any string.
|
// String is any string.
|
||||||
type String interface { ~string }
|
type String interface { ~string | ~[]uint8 }
|
||||||
|
|
||||||
// DecodeI8 decodes an 8 bit integer from the given data.
|
// DecodeI8 decodes an 8 bit integer from the given data.
|
||||||
func DecodeI8[T Int8](data []byte) (value T, n int, err error) {
|
func DecodeI8[T Int8](data []byte) (value T, n int, err error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user