Versions in this module Expand all Collapse all v0 v0.6.0 May 1, 2019 Changes in this version + var ErrCannotDecodeNilValue = errors.New("cannot decode nil value") + var ErrCannotEncodeNilValue = errors.New("cannot encode nil value") + type TypeMarshaler interface + Marshal func(enc *TypeEncoder) error + type TypeUnmarshaler interface + Unmarshal func(enc *TypeDecoder) error v0.5.0 Jan 3, 2019 Changes in this version + func RandomizeBytes(in []byte) []byte + func RemoveDirContents(dir string) error + func Ripemd160(in []byte) ([]byte, error) + func Ripemd160Checksum(in []byte) ([]byte, error) + func Sha512Checksum(in []byte) ([]byte, error) + func ToBytes(in interface{}) []byte + func ToFixed(num float64, precision int) float64 + func ToFixedRounded(num float64, precision int) float64 + func ToMap(in interface{}) map[string]interface + func ToPrecisionString(value float64, precision int) string + func WaitForCondition(d time.Duration, testFn func() bool) bool + type ByteReader struct + func (br ByteReader) ReadByte() (byte, error) + type StringBuilder []string + func (sb *StringBuilder) AddTemplate(t *template.Template, name string, data interface{}) error + func (sb *StringBuilder) Append(s string) + func (sb *StringBuilder) Join(s *StringBuilder) + func (sb *StringBuilder) String() string + type TypeDecoder struct + func NewTypeDecoder(r io.Reader) *TypeDecoder + func (p *TypeDecoder) Decode(v interface{}) error + func (p *TypeDecoder) DecodeNumber(v interface{}) error + func (p *TypeDecoder) DecodeString(v interface{}) error + func (p *TypeDecoder) DecodeUVarint(v interface{}) error + func (p *TypeDecoder) ReadBytes(v interface{}, len uint64) error + type TypeEncoder struct + func NewTypeEncoder(w io.Writer) *TypeEncoder + func (p *TypeEncoder) Encode(v interface{}) error + func (p *TypeEncoder) EncodeNumber(v interface{}) error + func (p *TypeEncoder) EncodeString(v string) error + func (p *TypeEncoder) EncodeStringSlice(v []string) error + func (p *TypeEncoder) EncodeUVarint(i uint64) error + func (p *TypeEncoder) EncodeVarint(i int64) error + type TypeMarshaller interface + Marshal func(enc *TypeEncoder) error + type TypeUnmarshaller interface + Unmarshal func(enc *TypeDecoder) error