iotex-core: github.com/iotexproject/iotex-core/pkg/util/byteutil Index | Files

package byteutil

import "github.com/iotexproject/iotex-core/pkg/util/byteutil"

Index

Package Files

byteutil.go

func BytesToUint64 Uses

func BytesToUint64(value []byte) uint64

BytesToUint64 converts 8 bytes with the machine endian to uint64

func Must Uses

func Must(d []byte, err error) []byte

Must is a helper wraps a call to a function returing ([]byte, error) and panics if the error is not nil.

func Uint32ToBytes Uses

func Uint32ToBytes(value uint32) []byte

Uint32ToBytes converts a uint32 to 4 bytes with the machine endian

func Uint64ToBytes Uses

func Uint64ToBytes(value uint64) []byte

Uint64ToBytes converts a uint64 to 8 bytes with the machine endian

Package byteutil imports 1 packages (graph) and is imported by 11 packages. Updated 2019-08-02. Refresh now. Tools for package owners.