util

package
v0.15.21 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 4 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 applies a delay in milliseconds if the specified environment variable is set. The environment variable should contain an integer value representing milliseconds.

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