Source File
random_nonwin.go
Belonging Package
github.com/gookit/goutil/strutil
//go:build !windowspackage strutilimport ()var rn = newRand()func newRand() *rand.Rand {return rand.New(rand.NewSource(time.Now().UnixNano()))}// buildRandomString 生成随机字符串func buildRandomString( string, int) string {// rn := newRand():= make([]byte, ):= len()for := 0; < ; ++ {[] = [rn.Intn()]}return Byte2str()}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |