package rand
import "k8s.io/client-go/1.4/pkg/util/rand"
Package rand provides utilities related to randomization.
Index ¶
- func Int63nRange(min, max int64) int64
- func Intn(max int) int
- func IntnRange(min, max int) int
- func Perm(n int) []int
- func Seed(seed int64)
- func String(length int) string
Functions ¶
func Int63nRange ¶
IntnRange generates an int64 integer in range [min,max). By design this should panic if input is invalid, <= 0.
func Intn ¶
Intn generates an integer in range [0,max). By design this should panic if input is invalid, <= 0.
func IntnRange ¶
IntnRange generates an integer in range [min,max). By design this should panic if input is invalid, <= 0.
func Perm ¶
Perm returns, as a slice of n ints, a pseudo-random permutation of the integers [0,n) from the default Source.
func Seed ¶
func Seed(seed int64)
Seed seeds the rng with the provided seed.
func String ¶
String generates a random alphanumeric string n characters long. This will panic if n is less than zero.
Source Files ¶
rand.go
- Version
- v1.4.0
- Published
- Oct 17, 2016
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 10 minutes ago –
Tools for package owners.