functions

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PickRandomDate

func PickRandomDate(ctx context.Context) string

PickRandomDate picks a random date.

func PickRandomSliceFromSlice

func PickRandomSliceFromSlice(ctx context.Context, slice *[][]string) []string

PickRandomSliceFromSlice picks a random slice from the given slice.

func PickRandomStringFromSlice

func PickRandomStringFromSlice(ctx context.Context, slice *[]string) string

PickRandomStringFromSlice picks a random element from the given slice.

func PickRandomYear

func PickRandomYear(ctx context.Context) string

PickRandomYear picks a random year.

func RandomBase64String

func RandomBase64String(ctx context.Context) string

RandomBase64String returns a random base64 string.

func RecalculateProbabilityWithUncertainity

func RecalculateProbabilityWithUncertainity(ctx context.Context, baseProbability float64,
	uncertainty float64, definePrefix int,
) float64

RecalculateProbabilityWithUncertainity recalculates the probability with the given uncertainty.

func SleepWithContext

func SleepWithContext(ctx context.Context, logger *slog.Logger, duration time.Duration)

SleepWithContext sleeps for the given duration or until the context is done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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