util

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: GPL-3.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToTime added in v0.2.0

func BytesToTime(b []byte) (time.Time, error)

BytesToTime converts []byte to time

func BytesToUint64

func BytesToUint64(b []byte) uint64

BytesToUint64 converts []byte to uint64

func CopyBytes

func CopyBytes(b []byte) []byte

CopyBytes copy []byte to another []byte

func IsAllZeros added in v0.1.9

func IsAllZeros(b []byte) bool

IsAllZeros return true if all bytes are zero

func Sort added in v0.2.5

func Sort(candidates map[string]*big.Int, seed uint64) []string

Sort sorts candidates, with ts to resolve the equal case

func TimeToBytes added in v0.2.0

func TimeToBytes(t time.Time) ([]byte, error)

TimeToBytes converts time to []byte

func Uint64ToBytes

func Uint64ToBytes(u uint64) []byte

Uint64ToBytes converts uint64 to []byte

func Uint64ToInt64 added in v0.2.0

func Uint64ToInt64(u uint64) int64

Uint64ToInt64 converts uint64 to int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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