What version of Go are you using. I ran your code a few times and could not reproduce on my version which is a few commits off of tip.
On Tue, 4 Apr 2017, at 09:37 AM, Mukund 8kmiles wrote: > Hi, > > It is a basic index out of range but inside *math.Rand() *and not in > objects that I create. Could that be a bug ? I have given my source, > below. Any help or pointers is appreciated > > panic: runtime error: index out of range > > goroutine 32 [running]: > panic(0x7d5780, 0xc420010140) > /opt/go/src/runtime/panic.go:500 +0x1a1 > math/rand.(*rngSource).Int63(0xc420024a00, 0x694976b867c8d8d7) > /opt/go/src/math/rand/rng.go:243 +0x85 > math/rand.(*Rand).Int63(0xc4200ccac0, 0x694976b867c8d8d7) > /opt/go/src/math/rand/rand.go:64 +0x33 > math/rand.(*Rand).Int31(0xc4200ccac0, 0x7ffe694976b8) > /opt/go/src/math/rand/rand.go:70 +0x2b > math/rand.(*Rand).Int31n(0xc4200ccac0, 0x64, 0x0) > /opt/go/src/math/rand/rand.go:105 +0x5c > math/rand.(*Rand).Intn(0xc4200ccac0, 0x64, 0x0) > /opt/go/src/math/rand/rand.go:119 +0x45 > *flowlogs.pickENI(0xc4200110c0, 0xc)* > /home/mukund/go/src/flowlogs/vpcflowlogs.go:351 +0x39 > flowlogs.GenerateVPCLogData(0xa, 0x0, 0x0, 0x0) > /home/mukund/go/src/flowlogs/vpcflowlogs.go:126 +0x15d > main.ingestRecords(0xc420210000, 0xc420394480, 0xc420394495, 0x1, > 0x7ffee087b128, 0x3, 0xa, 0xa) > /home/mukund/go/src/flmain/kinesisproducer.go:288 +0xd4 > created by main.main > /home/mukund/go/src/flmain/kinesisproducer.go:108 +0x6ef > exit status 2 > > ***************************************************************** > > source: > https://play.golang.org/p/SGkJyxYPiR > > ***************************************************************** > > > > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
