utils

package
v0.0.0-...-52fa7fc Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcHash

func CalcHash(data []byte) []byte

CalcHash returns wyhash hash

func ChooseEC

func ChooseEC(l int) elliptic.Curve

ChoosEC returns elliptic curve based on its length

func ChunkBy

func ChunkBy[T any](items []T, chunkSize int) [][]T

ChunkBy splits array on sub-arrays with specified chunk size

func EnvOr

func EnvOr(key, def string) string

EnvOr if environment variable is not specified returns default value

func RandString

func RandString(n int) string

RandString returns random string with specified length

func RandUint32

func RandUint32() uint32

RandUint32 returns random uint32 value

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳