Check out example codes for "random number golang". It will help you in understanding the concepts better.

Code Example 1

// Uniform Random int (min <= x <= max)
x = rand.Intn(max - min) + min

// Uniform random float (0 <= x <= 1)
x = rand.Float64()  

// Uniform random float (min <= x <= max)
x = (rand.Float64() * (max - min)) + min

Code Example 2

rand.Intn(max - min) + min

Learn ReactJs, React Native from akashmittal.com