dimanche 17 décembre 2017

Golang generate Random uint64 between min and max

How can I generate a random 64 bit unsigned integer in golang?

First I need to call

rand.Seed(0)

and then I need a function that returns a uint64 with the following signature

func random(min, max uint64) uint64 {
}

The function above should return a random 64 bit unsigned integer in the range [min, max] (min and max included)




Aucun commentaire:

Enregistrer un commentaire