Skip to content

Commit

Permalink
Fix deprecated rand.Seed in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oxzi committed Nov 13, 2023
1 parent 307b416 commit 9a5b125
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions item_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ func TestItem(t *testing.T) {
writer := multipart.NewWriter(buff)

tmpFileData := make([]byte, test.size)
rand.Seed(0)
rand.Read(tmpFileData)
rand.New(rand.NewSource(0)).Read(tmpFileData)

if f, err := writer.CreateFormFile(formFile, test.filename); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 9a5b125

Please sign in to comment.