xrandom

package
v0.0.0-...-dd6747b Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenHash

func GenHash(src string) string

生成随机40位哈希

func GenRandomInt

func GenRandomInt(start int, end int) int

生成范围在[start,end), 类型为int的随机数

func GenRandomInt64

func GenRandomInt64(start int64, end int64) int64

生成范围在[start,end), 类型为int64的随机数

func GenRandomInt64List

func GenRandomInt64List(start int64, end int64, count int) []int64

生成范围在[start,end), 类型为int64的n个不重复随机数

func GenRandomIntList

func GenRandomIntList(start int, end int, count int) []int

生成范围在[start,end), 类型为int的n个不重复随机数

func GenUUID

func GenUUID() string

* 生成uuid

func GenUniqueId

func GenUniqueId() (snowflake.ID, error)

* 生成分布式唯一ID: 整数,自增,且不连续

func GetRandomString

func GetRandomString(l int) string

生成简单伪随机字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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