randx

package module
v0.0.0-...-6d4b899 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package randx.md Date: 2022/9/7 00:57 Author: Amu Description:

Index

Constants

View Source
const (
	Numeral      = "0123456789"
	LowerLetters = "abcdefghijklmnopqrstuvwxyz"
	UpperLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Letters      = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
)

Variables

This section is empty.

Functions

func RandBytes

func RandBytes(length int) []byte

RandBytes generate random byte slice

func RandInt

func RandInt(min, max int) int

RandInt generate random ini between min and max, maybe in, not be max

func RandLower

func RandLower(length int) string

RandLower generate a random lower case string

func RandNumeral

func RandNumeral(length int) string

RandNumeral generate a random numeral string of specified length

func RandNumeralOrLetter

func RandNumeralOrLetter(length int) string

RandNumeralOrLetter generate a random numeral or letter string

func RandString

func RandString(length int) string

RandString 生成随机字符串

func RandUpper

func RandUpper(length int) string

RandUpper generate a random upper case string

func UUID4

func UUID4() (string, error)

UUID4 generate a random UUID of version 4 according to RFC 4122.

Types

This section is empty.

Jump to

Keyboard shortcuts

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