Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Parsing/Encoding ErrEmptyString = &toolsErr{"empty hex string"} ErrSyntax = &toolsErr{"invalid hex string"} ErrMissingPrefix = &toolsErr{"hex string without 0x prefix"} ErrOddLength = &toolsErr{"hex string of odd length"} ErrEmptyNumber = &toolsErr{"hex string \"0x\""} ErrLeadingZero = &toolsErr{"hex number with leading zero digits"} ErrUint64Range = &toolsErr{"hex number > 64 bits"} ErrBig256Range = &toolsErr{"hex number > 256 bits"} )
Errors
Functions ¶
func SmartMarshal ¶
func SmartMarshal(inItem Marshaller, ioBuf []byte) []byte
SmartMarshal marshals the given item to the given buffer. If there is not enough space
Types ¶
type Buf ¶
type Buf struct { Unmarshaller Bytes []byte }
Buf is a flexible buffer designed for reuse.
type Bytes ¶
type Bytes []byte
Bytes marshal/unmarshal as a JSON string with 0x prefix. The empty slice marshals as "0x".
func (Bytes) MarshalText ¶
MarshalText implements encoding.TextMarshaler
func (*Bytes) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Bytes) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Marshaller ¶
Marshaller used to generalize serialization
type Unmarshaller ¶
Unmarshaller used to generalize deserialization
Click to show internal directories.
Click to hide internal directories.