formatting
Package formatting
import "github.com/luxfi/node/utils/formatting"Functions
Decode
func Decode(encoding Encoding, str string) ([]byte, error)Decode [str] to bytes using the given encoding If [str] is the empty string, returns a nil byte slice and nil error
Encode
func Encode(encoding Encoding, bytes []byte) (string, error)Encode [bytes] to a string using the given encoding format [bytes] may be nil, in which case it will be treated the same as an empty slice.
IntFormat
func IntFormat(maxValue int) stringTypes
Encoding
Encoding defines how bytes are converted to a string and vice versa
func (enc Encoding) MarshalJSON() ([]byte, error)func (enc Encoding) String() stringfunc (enc *Encoding) UnmarshalJSON(b []byte) errorPrefixedStringer
PrefixedStringer extends a stringer that adds a prefix