util

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: AGPL-3.0, ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUint64 added in v0.1.1

func BytesToUint64(b []byte) uint64

func FileExists

func FileExists(path string) bool

func GetFileSize added in v0.1.1

func GetFileSize(filepath string) (int64, error)

func IsBitSet

func IsBitSet(bytes []byte, bitPosition int) bool

func IsValidURI added in v0.1.1

func IsValidURI(u string) bool

func Min added in v0.1.1

func Min[T constraints.Ordered](a, b T) T

func ReadJsonFile

func ReadJsonFile[T any](path string, res *T) (*T, error)

func ShuffleSliceCopy

func ShuffleSliceCopy[T any](src []T) (dst []T)

func Uint32ToBytes added in v0.1.1

func Uint32ToBytes(i uint32) []byte

func Uint64ToBytes

func Uint64ToBytes(i uint64) []byte

func Uint256ToBytes added in v0.1.1

func Uint256ToBytes(i *uint256.Int) []byte

func WriteDebugJsonLog

func WriteDebugJsonLog(l log.Logger, m string, arg interface{})

func WriteJsonFile

func WriteJsonFile[T any](path string, obj *T) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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