Run NodesReferenceutils

wrappers

Package wrappers

import "github.com/luxfi/node/utils/wrappers"

Functions

StringLen

func StringLen(str string) int

Types

Closer

Closer is a nice utility for closing a group of objects while reporting an error if one occurs.

func (c *Closer) Add(closer io.Closer)
func (c *Closer) Close() error

Errs

func (errs *Errs) Add(errors ...error)
func (errs *Errs) Errored() bool

Packer

Packer packs and unpacks a byte array from/to standard values

func (p *Packer) PackBool(b bool)
func (p *Packer) PackByte(val byte)
func (p *Packer) PackBytes(bytes []byte)
func (p *Packer) PackFixedBytes(bytes []byte)
func (p *Packer) PackInt(val uint32)
func (p *Packer) PackLong(val uint64)
func (p *Packer) PackShort(val uint16)
func (p *Packer) PackStr(str string)
func (p *Packer) UnpackBool() bool
func (p *Packer) UnpackByte() byte
func (p *Packer) UnpackBytes() []byte
func (p *Packer) UnpackFixedBytes(size int) []byte
func (p *Packer) UnpackInt() uint32
func (p *Packer) UnpackLimitedBytes(limit uint32) []byte
func (p *Packer) UnpackLimitedStr(limit uint16) string
func (p *Packer) UnpackLong() uint64
func (p *Packer) UnpackShort() uint16
func (p *Packer) UnpackStr() string