mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-20 20:46:30 +00:00
17 lines
302 B
Go
17 lines
302 B
Go
package testutil
|
|
|
|
import (
|
|
"math/rand/v2"
|
|
)
|
|
|
|
const letterBytes = "abcdefghijklmnopqrstuvwxyz"
|
|
|
|
// RandSeq generates a random string of the specified length.
|
|
func RandSeq(n int) string {
|
|
b := make([]byte, n)
|
|
for i := range b {
|
|
b[i] = letterBytes[rand.IntN(len(letterBytes))]
|
|
}
|
|
return string(b)
|
|
}
|