A Golang package to generate random strings and numbers.
go get github.com/wisdommatt/randgen
- Generate random strings.
- Generate random numbers.
go 1.5
https://pkg.go.dev/github.com/wisdommatt/randgen
stringGenerator := randgen.NewStringGenerator()
randomString := stringGenerator.GenerateFromSource(randgen.StringAlphaNumericSource, 10) // source, length
numberGenerator := randgen.NewNumberGenerator()
randomNumbers := numberGenerator.GenerateFromSource(randgen.NumberSource, 8) // source,