xrand

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Uppercase ...
	Uppercase string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	// Lowercase ...
	Lowercase = "abcdefghipqrstuvwxyz"
	// Alphabetic ...
	Alphabetic = Uppercase + Lowercase
	// Numeric ...
	Numeric = "0123456789"
	// Alphanumeric ...
	Alphanumeric = Alphabetic + Numeric
	// Symbols ...
	Symbols = "`" + `~!@#$%^&*()-_+={}[]|\;:"<>,./?`
	// Hex ...
	Hex = Numeric + "abcdef"
)

Charsets

Variables

This section is empty.

Functions

func Float64

func Float64() float64

Float64 implements rand.Float64 on the grpcrand global source.

func Int63n

func Int63n(n int64) int64

Int63n implements rand.Int63n on the grpcrand global source.

func Intn

func Intn(n int) int

Intn implements rand.Intn on the grpcrand global source.

func Shuffle

func Shuffle(length int, fn func(i, j int))

Shuffle ...

func String

func String(length uint8, charsets ...string) string

String 返回随机字符串,通常用于测试mock数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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