Skip to content

Commit

Permalink
Remove unused import and seed random number generator
Browse files Browse the repository at this point in the history
  • Loading branch information
gshaibi committed Mar 31, 2024
1 parent ea9e999 commit a2cd72e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions internal/common/topology/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package topology

import (
"math/rand"
"time"
)

func (r *Range) Random() int {
if r.Min == r.Max {
return r.Min
}

rand.Seed(time.Now().UnixNano())
return r.Min + rand.Intn(r.Max-r.Min)
}

0 comments on commit a2cd72e

Please sign in to comment.