util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(val bool, message string)

func BytesToBigInt

func BytesToBigInt(b []byte) *big.Int

func CheckEOF

func CheckEOF(conn *net.Conn)

func CheckErr

func CheckErr(err error, message string)

func Delay

func Delay(f func(), interval int64)

func Fill

func Fill(buffer *bytes.Buffer, length int)

func Flatten

func Flatten[T any](arrays [][]T) []T

func MarshalCBOR

func MarshalCBOR(val interface{}) []byte

func NewLogger

func NewLogger(prefix string, enabled bool) *log.Logger

func Pad

func Pad[T any](src []T, size int) []T

func Read

func Read(reader io.Reader, length uint) []byte

func ReadBE

func ReadBE[T any](reader io.Reader) T

func ReadLE

func ReadLE[T any](reader io.Reader) T

func SetLogOutput

func SetLogOutput(out io.Writer)

func SizeOf

func SizeOf[T any]() uint8

func StartRecurringFunction

func StartRecurringFunction(f func(), interval int64) chan interface{}

func ToBE

func ToBE[T any](val T) []byte

func ToLE

func ToLE[T any](val T) []byte

func Utf16encode

func Utf16encode(message string) []byte

func Write

func Write(writer io.Writer, data []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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