conv

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 4 Imported by: 5

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 Uint64Marshal

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

Marshal a uint64, with quotes

func Uint64Unmarshal

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

Parse a uint64, with or without quotes, in any base, with common prefixes accepted to change base.

Types

This section is empty.

Jump to

Keyboard shortcuts

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