> > > Also, am I seeding math.rand correctly in the Init() function? Will > seeding it in the Init() function override any seeding I do in my tests? > > You're using time.Now().UTC().UnixNano()) but
time.Now().UnixNano() or time.Now().Unix() seem just as good Note UnixNano() may be beyond the accuracy at with the CPU reports - so it may well trail zeros .. conversely 1 sec intervals in Unix() may be too large .. time.Now().UnixNano()/1000 ie microseconds or similar could be a good compromise I assume the reason you are doing this is to get a different set of randoms everytime you run - obviously that will make testing next to impossible - my suggestion based on experience - test with a set of seeds - ie 1,2,3 in rand.Seed .. testing with just one seed often gave me corner case results which misled me on the validity of my code - testing with a set of seeds should ensure that your random numbers are "randomly selected" -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.