2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-10 23:31:09 +00:00

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

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)