Anyone familiar with the LND codebase and the TLV encoding library in it would probably be vaguely familiar with the following two functions:
func ReadVarInt(r io.Reader, buf *[8]byte) (uint64, error)
func WriteVarInt(w io.Writer, val uint64, buf *[8]byte) error
found here:
https://github.com/lightningnetwork/lnd/blob/master/tlv/varint.go
Note how this is the same function signatures as these also:
func EUint64T(w io.Writer, val uint64, buf *[8]byte) error
func DUint8(r io.Reader, val interface{}, buf *[8]byte, l uint64) error
oh, look at that. This first one above is different. The others are not though:
func EBytes32(w io.Writer, val interface{}, _ *[8]byte) error
func DBytes32(r io.Reader, val interface{}, _ *[8]byte, l uint64) error
Definitely should be an interface. WTH @roasbeef (he's not here???)