util

package
v0.15.31 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxUserNameLength = 32
)

Variables

This section is empty.

Functions

func DelayIfEnvSet added in v0.15.8

func DelayIfEnvSet(envVarName string)

DelayIfEnvSet sleeps for the duration specified by the environment variable. The value must be a Go duration string (e.g. "500ms", "2s"). Invalid values are ignored.

func FailRandomlyIfEnvSet added in v0.15.10

func FailRandomlyIfEnvSet(envVarName string) bool

FailRandomlyIfEnvSet checks if this request should fail based on a random percentage. The environment variable should contain an integer value between 0 and 100 representing the failure rate percentage. Invalid values are treated as 0 (no failures).

func GenerateAlphaNumToken

func GenerateAlphaNumToken(length int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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