Documentation ¶
Overview ¶
Package rands 生成各种随机字符串
// 生成一个长度介于 [6,9) 之间的随机字符串 str := rands.String(6, 9, []byte("1343567")) // 生成一个带缓存功能的随机字符串生成器 r := rands.New(nil, 100, 5, 7, []byte("adbcdefgadf;dfe1334")) ctx,cancel := context.WithCancel(context.Background()) go r.Serve(ctx) defer cancel() str1 := r.String() str2 := r.String()
NOTE: 仅是随机字符串,不保证唯一性。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.