mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 00:58:45 +05:00
remove deprecated math/rand.Seed calls
see https://pkg.go.dev/math/rand#Seed
This commit is contained in:
committed by
Dan Christian Bogos
parent
0aa5cf38e8
commit
df7b65833a
@@ -30,10 +30,6 @@ import (
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
}
|
||||
|
||||
// ResourceProfile represents the user configuration for the resource
|
||||
type ResourceProfile struct {
|
||||
Tenant string
|
||||
|
||||
@@ -180,7 +180,6 @@ func (rbcs *RandomBalancesSorter) Sort() {
|
||||
src := *rbcs
|
||||
// randomize balance chain
|
||||
dest := make([]*Balance, len(src))
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
perm := rand.Perm(len(src))
|
||||
for i, v := range perm {
|
||||
dest[v] = src[i]
|
||||
|
||||
Reference in New Issue
Block a user