Skip to content

Conversation

@alexeykiselev
Copy link
Collaborator

No description provided.

@alexeykiselev alexeykiselev added enhancement New feature or request wip This is a WIP, should not be merged right away do not merge The PR is not ready to be merged labels Jan 19, 2026
// The peer was not found in the larges group, time to change the peer.
// Select the random peer from the group and return it along with a new score value.
i := rand.IntN(len(g.peers)) // #nosec: it's ok to use math/rand/v2 here
i := rand.IntN(len(g.peers)) //nolint: gosec // it's ok to use math/rand/v2 here.

Check failure

Code scanning / gosec

Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) Error

Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand)
return PeerInfo{}, err
}
n := rand.IntN(len(ips)) // #nosec: it's ok to use math/rand/v2 here
n := rand.IntN(len(ips)) //nolint: gosec // it's ok to use math/rand/v2 here.

Check failure

Code scanning / gosec

Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) Error

Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge The PR is not ready to be merged enhancement New feature or request wip This is a WIP, should not be merged right away

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants