random

package
v1.22.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Zlib Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateLowerString

func GenerateLowerString(length int) string

GenerateLowerString *

  • 返回一个定长的随机纯小写字母字符串(只包含大小写字母) *
  • @param length
  • 随机字符串长度
  • @return 随机字符串

func GenerateLowerStringV2 added in v1.22.10

func GenerateLowerStringV2(r *rand.Rand, length int) string

func GenerateMixString

func GenerateMixString(length int) string

GenerateMixString *

  • 返回一个定长的随机纯字母字符串(只包含大小写字母) *
  • @param length
  • 随机字符串长度
  • @return 随机字符串

func GenerateMixStringV2 added in v1.22.10

func GenerateMixStringV2(r *rand.Rand, length int) string

func GenerateNumString

func GenerateNumString(length int) string

GenerateNumString *

  • 返回一个定长的随机数字字符串(只包含数字) *
  • @param length
  • 随机字符串长度
  • @return 随机字符串

func GenerateNumStringV2 added in v1.22.10

func GenerateNumStringV2(r *rand.Rand, length int) string

func GenerateString

func GenerateString(length int) string

GenerateString *

  • 返回一个定长的随机字符串(只包含大小写字母、数字) *
  • @param length
  • 随机字符串长度
  • @return 随机字符串

func GenerateStringV2 added in v1.22.10

func GenerateStringV2(r *rand.Rand, length int) string

func GenerateUpperString

func GenerateUpperString(length int) string

GenerateUpperString *

  • 返回一个定长的随机纯大写字母字符串(只包含大小写字母) *
  • @param length
  • 随机字符串长度
  • @return 随机字符串 *

func GenerateUpperStringV2 added in v1.22.10

func GenerateUpperStringV2(r *rand.Rand, length int) string

func Random

func Random() *rand.Rand

func Source

func Source() rand.Source

Types

This section is empty.

Jump to

Keyboard shortcuts

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