MCPcopy
hub / github.com/gdy666/lucky / GetRandomString

Function GetRandomString

thirdlib/gdylib/stringsp/randomutils.go:21–27  ·  view source on GitHub ↗

GetRandomString 生成随机字符串

(len int)

Source from the content-addressed store, hash-verified

19
20//GetRandomString 生成随机字符串
21func GetRandomString(len int) string {
22 var resBuf strings.Builder
23 for i := 0; i < len; i++ {
24 resBuf.WriteByte(stringsBytes[randVar.Intn(strModelLength)])
25 }
26 return resBuf.String()
27}
28
29//GetRandomStringNum 生成随机数字字符串
30func GetRandomStringNum(len int) string {

Callers 12

DDNSTaskListAddFunction · 0.92
AlterWOLClientConfigureFunction · 0.92
WOLDeviceListAddFunction · 0.92
SSLCertficateListAddFunction · 0.92
PortForwardsRuleAddFunction · 0.92
SSLCertficateListAddFunction · 0.92
WOLDeviceListAddFunction · 0.92
DDNSTaskListAddFunction · 0.92
FlushLoginRandomKeyFunction · 0.92

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected