From c3d0d16e4476a0cdbbf43b0e0f52f8c7d6ec596a Mon Sep 17 00:00:00 2001 From: Kharec Date: Wed, 7 Jan 2026 11:43:47 +0100 Subject: [PATCH] refactor: use math/rand only for parallel processor seeding --- cmd/goyco/commands/parallel_processor.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/goyco/commands/parallel_processor.go b/cmd/goyco/commands/parallel_processor.go index 32c8286..805db57 100644 --- a/cmd/goyco/commands/parallel_processor.go +++ b/cmd/goyco/commands/parallel_processor.go @@ -2,7 +2,6 @@ package commands import ( "context" - cryptoRand "crypto/rand" "fmt" "math/rand" "runtime" @@ -25,11 +24,6 @@ func NewParallelProcessor() *ParallelProcessor { maxWorkers := max(min(runtime.NumCPU(), 8), 2) seed := time.Now().UnixNano() - seedBytes := make([]byte, 8) - if _, err := cryptoRand.Read(seedBytes); err == nil { - seed = int64(seedBytes[0])<<56 | int64(seedBytes[1])<<48 | int64(seedBytes[2])<<40 | int64(seedBytes[3])<<32 | - int64(seedBytes[4])<<24 | int64(seedBytes[5])<<16 | int64(seedBytes[6])<<8 | int64(seedBytes[7]) - } return &ParallelProcessor{ maxWorkers: maxWorkers,