Golang Quick bits
Generate random number
Generate a random number between 0 and 10 using packages time and rand.
source := rand.NewSource(time.Now().UnixNano())
r := rand.New(source)
i := r.Intn(10)
Generate a random number between 0 and 10 using packages time and rand.
source := rand.NewSource(time.Now().UnixNano())
r := rand.New(source)
i := r.Intn(10)