conv

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DestNilErr = errors.New("destination is nil")
View Source
var EmptyInputErr = errors.New("input is empty")
View Source
var MissingQuoteErr = errors.New("input has quote open without close")

Functions

func BytesMarshalText

func BytesMarshalText(b []byte) ([]byte, error)

func BytesString added in v0.1.2

func BytesString(b []byte) string

func DynamicBytesUnmarshalText added in v0.1.3

func DynamicBytesUnmarshalText(dst *[]byte, text []byte) error

Decodes hex data, with optional 0x prefix, and lower/upper/mixed case. Reuses the dst space if possible. If dst is too small, a new dst is allocated and the old header is overwritten

func FixedBytesUnmarshalText

func FixedBytesUnmarshalText(dst []byte, text []byte) error

Decodes hex data, with optional 0x prefix, and lower/upper/mixed case. The decoded byte length must match the dst length.

func Uint16Marshal added in v0.2.0

func Uint16Marshal(v uint16) ([]byte, error)

Uint16Marshal to decimal number, with quotes

func Uint16Unmarshal added in v0.2.0

func Uint16Unmarshal(v *uint16, b []byte) error

func Uint256Marshal added in v0.2.0

func Uint256Marshal(v *uint256.Int) ([]byte, error)

Uint256Marshal to decimal number, with quotes

func Uint256Unmarshal added in v0.2.0

func Uint256Unmarshal(v *uint256.Int, b []byte) error

func Uint32Marshal added in v0.2.0

func Uint32Marshal(v uint32) ([]byte, error)

Uint32Marshal to decimal number, with quotes

func Uint32Unmarshal added in v0.2.0

func Uint32Unmarshal(v *uint32, b []byte) error

func Uint64Marshal

func Uint64Marshal(v uint64) ([]byte, error)

Uint64Marshal to decimal number, with quotes

func Uint64Unmarshal

func Uint64Unmarshal(v *uint64, b []byte) error

func Uint8Marshal added in v0.2.0

func Uint8Marshal(v uint8) ([]byte, error)

Uint8Marshal to decimal number, with quotes

func Uint8Unmarshal added in v0.2.0

func Uint8Unmarshal(v *uint8, b []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL