grand

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRandStrRange = "abcdefghijklmnopqrstuvwxyz"
)

Variables

This section is empty.

Functions

func NewRand

func NewRand(len int) string

NewRand Create a rang string

func NewRandWithPrefix

func NewRandWithPrefix(prefix string, len int) string

NewRandWithPrefix Create a rang string with prefix

func NewUUID

func NewUUID() string

NewUUID generates a new UUID based on version 4.

func NormRand

func NormRand(n int64) float64

NormRand 标准正态分布随机整数,n为随机个数,从0开始

func RangeRand

func RangeRand(n int) int

RangeRand 生成规定范围内的整数 设置起始数字范围,0开始,n截止

func StringRand

func StringRand(strRange string, n int) string

StringRand returns a 'random' string. Don't rely on this to have a secure level of entropy.

Types

This section is empty.

Jump to

Keyboard shortcuts

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