rand

package
v0.0.0-0d51025 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ldigit = 1 << iota
	LlowerCase
	LupperCase
	LlowerAndUpperCase = LlowerCase | LupperCase
	LdigitAndLowerCase = Ldigit | LlowerCase
	LdigitAndUpperCase = Ldigit | LupperCase
	LdigitAndLetter    = Ldigit | LlowerCase | LupperCase
)

define a flag that generates a random string

Variables

View Source
var (
	ErrInvalidFlag = errors.New("Invalid flag")
)

definition error

Functions

func Random

func Random(length, flag int) (string, error)

Random generate a random string specifying the length of the random number and the random flag

Types

This section is empty.

Jump to

Keyboard shortcuts

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