yep you are right ! fixed it thanks
https://github.com/alok87/goutils/commit/9f5f19a65eedf1bc9be82ec3f3b42c92142b2b8e
On Monday, July 10, 2017 at 8:15:13 PM UTC+5:30, Jan Mercl wrote:
>
>
> On Mon, Jul 10, 2017 at 4:41 PM Alok Kumar Singh > wrote:
>
> > in my usecasei
On Mon, Jul 10, 2017 at 4:41 PM Alok Kumar Singh
wrote:
> in my usecasei use this to generate random slice everytime
> dont want the same result
> using it to test my algos
For that you need one only call to Seed at init().
--
-j
--
You received this message because
Alok,
On Mon, Jul 10, 2017 at 3:04 PM, Alok Kumar Singh
wrote:
> I have fixed it thanks
>
I wouldn't recommend using rand.Seed as you do: this defeats any attempt at
getting reproductible results.
-s
--
You received this message because you are subscribed to the
I have fixed it thanks
On Mon, Jul 10, 2017 at 9:54 AM, peterGo wrote:
> Alok,
>
> Your import path "github.com/alok87/goutils/random" is not valid for "go
> get". The source is at "github.com/alok87/goutils/pkg/random".
>
> You write "for { rand.Seed(); rand.Intn(); }".
Alok,
Your import path "github.com/alok87/goutils/random" is not valid for "go
get". The source is at "github.com/alok87/goutils/pkg/random".
You write "for { rand.Seed(); rand.Intn(); }". Therefore, the range of
values is not random.
You write "arr[r] = rand.Intn(max) + min" which is
A python like range utility which can be used for this
https://github.com/alok87/goutils/blob/master/pkg/random/random.go
```random.RangeInt(2, 100, 3)```
On Wednesday, March 28, 2012 at 5:43:55 AM UTC+5:30, Guillermo Estrada
wrote:
>
> Hi, I've been reading some posts but I still have the same