Use newRandReader instead of rand.New()

This needs to be done since for Go < 1.6 rand.Rand does not implement
io.Reader.
This commit is contained in:
Alexander Neumann 2016-03-06 14:21:02 +01:00
parent 18c3024171
commit e4a6dd8c8c
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ func fillPacks(t testing.TB, rnd *randReader, be Saver, pm *packerManager, buf [
t.Fatal(err)
}
rd := rand.New(rand.NewSource(seed))
rd := newRandReader(rand.NewSource(seed))
id := randomID(rd)
buf = buf[:l]
_, err = io.ReadFull(rd, buf)