summaryrefslogtreecommitdiff
path: root/internal/cli/throttle.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-28 10:26:53 +0300
committerPaul Buetow <paul@buetow.org>2026-05-28 10:26:53 +0300
commit2eb6ea18b942ae2ac3ed54f09d4dab3032788d46 (patch)
tree7252b1757178332098448e9206c5fe3c640269aa /internal/cli/throttle.go
parent7322ee6540e0772e9a43658b96a1401fc071aef8 (diff)
fix(random): remove deprecated rand seeding (hq)
Diffstat (limited to 'internal/cli/throttle.go')
-rw-r--r--internal/cli/throttle.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/cli/throttle.go b/internal/cli/throttle.go
index 5241782..3b85d10 100644
--- a/internal/cli/throttle.go
+++ b/internal/cli/throttle.go
@@ -162,8 +162,7 @@ func recordRepoSync(repoName string, st *state.State, throttle bool) {
}
func randomThrottleDuration() time.Duration {
- rng := rand.New(rand.NewSource(time.Now().UnixNano()))
- days := throttleMinDays + rng.Intn(throttleMaxDays-throttleMinDays+1)
+ days := throttleMinDays + rand.Intn(throttleMaxDays-throttleMinDays+1)
return time.Duration(days) * 24 * time.Hour
}