All the integer functions in math/rand generate non-negative numbers.
rand.Int() int // [0, MaxInt] rand.Int31() int32 // [0, MaxInt32]
Solution that worked for me is: j = rand.Intn(600) - 100 where m is 100 and n is 500, it will generate numbers from -100 to 499.
j = rand.Intn(600) - 100