mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 10:12:18 +00:00
feat: Remove dead code
This commit is contained in:
parent
342aad6fe2
commit
5a00fa1f89
1 changed files with 2 additions and 12 deletions
|
|
@ -1,9 +1,7 @@
|
|||
package internal
|
||||
|
||||
import (
|
||||
crand "crypto/rand"
|
||||
"math"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"regexp"
|
||||
"time"
|
||||
|
|
@ -30,16 +28,8 @@ func CalculateBackoff(retryCount int) time.Time {
|
|||
|
||||
// RandInt returns a random integer up to max
|
||||
func RandInt(max int) int {
|
||||
if true {
|
||||
r := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec
|
||||
return r.Intn(max)
|
||||
}
|
||||
|
||||
r, err := crand.Int(crand.Reader, big.NewInt(int64(max)))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return int(r.Int64())
|
||||
r := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec
|
||||
return r.Intn(max)
|
||||
}
|
||||
|
||||
// StripNonAlphanum strips nonalphanumeric/non underscore characters from a string and returns a new one
|
||||
|
|
|
|||
Loading…
Reference in a new issue