Thank you. On Wednesday, 26 February 2020 01:03:35 UTC+5:30, Jake Montgomery wrote: > > > On Tuesday, February 25, 2020 at 1:42:31 PM UTC-5, Anjana Prabhakar wrote: >> >> I get the error as r1.randIntn undefined (type *math/rand.Rand has no >> field or method randIntn). Please help. >> > > The message is pretty clear. The first step I would take with a message > like that is to look at the documentation for the type that the compiler > has so kindly provided. If you go to the documentation for the rand > package <https://golang.org/pkg/math/rand/#pkg-index>, you will see that > the Rand struct has no method 'randIntn', just as the message says. The > next step would be to read about the methods that are available for > rand.Rand, and see if any of them fit your needs. > > (The fact that randIntn starts with a lower case letter is a big hint that > there could be no such public method.) > > Good Luck >
-- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/67171c6d-63d7-4704-9813-ecc78b3b7174%40googlegroups.com.