aboutsummaryrefslogtreecommitdiff
path: root/tests/plaintextnames
diff options
context:
space:
mode:
authorJakob Unterwurzacher2025-12-14 11:38:45 +0100
committerJakob Unterwurzacher2025-12-14 11:39:31 +0100
commit745276fe6e2b81570e5c84625699d632da5fd6a9 (patch)
tree7438205893d5a839766d80fd948eec818b5e66d4 /tests/plaintextnames
parent4762992b706a9d1950a86248720199ae8cd5d3e5 (diff)
Drop deprecated rand.Seed calls
$ staticcheck --version staticcheck 2025.1.1 (0.6.1) $ staticcheck ./... contrib/findholes/holes/holes.go:179:2: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (SA1019) tests/defaults/acl_test.go:24:2: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (SA1019) tests/plaintextnames/file_holes_test.go:143:2: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (SA1019)
Diffstat (limited to 'tests/plaintextnames')
-rw-r--r--tests/plaintextnames/file_holes_test.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/plaintextnames/file_holes_test.go b/tests/plaintextnames/file_holes_test.go
index ea47113..7a356c0 100644
--- a/tests/plaintextnames/file_holes_test.go
+++ b/tests/plaintextnames/file_holes_test.go
@@ -7,7 +7,6 @@ import (
"os/exec"
"syscall"
"testing"
- "time"
"github.com/rfjakob/gocryptfs/v2/tests/test_helpers"
@@ -140,7 +139,6 @@ func TestFileHoleCopy(t *testing.T) {
return
}
- rand.Seed(time.Now().UnixNano())
for k := 0; k < 100; k++ {
c1 := make([]int64, 10)
for i := range c1 {