utils

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUInt32

func BytesToUInt32(slice []byte) uint32

BytesToUInt32 convert byte slice to uint32

func BytesToUInt64

func BytesToUInt64(slice []byte) uint64

BytesToUInt64 convert byte slice to uint32

func ConcatByteArray

func ConcatByteArray(slices [][]byte) []byte

ConcatByteArray concat slice of bytes to single slice

func GetEpochTime

func GetEpochTime() int64

GetEpochTime return the time span in seconds

func PutUInt32ToBytes

func PutUInt32ToBytes(val uint32) []byte

PutUInt32ToBytes put uint32 to LittleEndian one byte

func ToJSON

func ToJSON(obj interface{}) ([]byte, error)

ToJSON convert object to json byte slice

func UInt32ToBytes

func UInt32ToBytes(val uint32) []byte

UInt32ToBytes convert uint32 to LittleEndian byte slice

func UInt64ToBytes

func UInt64ToBytes(val uint64) []byte

UInt64ToBytes convert uint64 to byte slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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