randompkg

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CharsetLowercase = "abcdefghijklmnopqrstuvwxyz"
	CharsetAlphabet  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
	CharsetNumeral   = "1234567890"
	CharsetHex       = "1234567890abcdef"
)

Variables

This section is empty.

Functions

func AlphabetLower added in v0.2.20

func AlphabetLower(n int) string

AlphabetLower 从小写字符集生成指定长度的随机字符串

func Hex added in v0.2.20

func Hex(n int) string

func Int32Between

func Int32Between(min, max int32) int32

Int32Between random number between min-max

func Int64Between

func Int64Between(min, max int64) int64

Int64Between random number between min-max

func IntBetween

func IntBetween(min, max int) int

IntBetween random number between min-max

func Letter

func Letter(size int) string

Letter : A-Z a-z

func Name

func Name() string

Name random name

func NewRandHandler

func NewRandHandler() *rand.Rand

NewRandHandler ...

func Numeric

func Numeric(size int) string

Numeric 0-9

func NumericBetween

func NumericBetween(min, max int64) int64

NumericBetween random number between min-max

func String added in v0.2.20

func String(n int, charset string) string

String returns a random string n characters long, composed of entities from charset.

func Strings

func Strings(size int) string

Strings : A-Z a-z 0-9

Types

This section is empty.

Jump to

Keyboard shortcuts

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