randutil

package
v0.232.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AsciiLower  = "abcdefghijklmnopqrstuvwxyz"
	AsciiUpper  = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	AsciiDigit  = "0123456789"
	AsciiSymbol = "!@#$%^&*()-_=+[]{}|;:',.<>/?`~"
)

Variables

This section is empty.

Functions

func String

func String(n int, seqs ...string) string

String returns a (weak) random string of the length "n". When not passing a seqs it will generate the string based on ascii lower,upper,digits and a bunch of (ascii) symbols.

With seqs passed it will select based on the provided sequences, i.e. String(10, AsciiDigits) will produce 10 random digits.

Do not use to generate secrets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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