v1.0.0: here we go again

This commit is contained in:
aykhans committed 2026-01-10 17:06:25 +04:00
1 parent 25d4762a3c
commit 2d7ba34cb8
68 files changed
+6805 -4548

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
package sarin
import (
"math/rand/v2"
"time"
)
func NewDefaultRandSource() rand.Source {
now := time.Now().UnixNano()
return rand.NewPCG(
uint64(now), //nolint:gosec // G115: Safe conversion; UnixNano timestamp used as random seed, bit pattern is intentional
uint64(now>>32), //nolint:gosec // G115: Safe conversion; right-shifted timestamp for seed entropy, overflow is acceptable
)
}