Spaces:
Paused
Paused
Download utils/random.go from zhepamagod/pplx2api: direct link, hf CLI and curl.
- Browser
- Download file 300 Bytes
-
https://huggingface.co/spaces/zhepamagod/pplx2api/resolve/main/utils/random.go
- Command line
-
hf download hf://spaces/zhepamagod/pplx2api/utils/random.go
-
curl -L -o random.go https://huggingface.co/spaces/zhepamagod/pplx2api/resolve/main/utils/random.go
300 Bytes
| package utils | |
| import "math/rand" | |
| func RandomString(length int) string { | |
| const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
| result := make([]byte, length) | |
| for i := range result { | |
| result[i] = charset[rand.Intn(len(charset))] | |
| } | |
| return string(result) | |
| } | |