Skip to content

Conversation

@dolmen
Copy link
Contributor

@dolmen dolmen commented Mar 12, 2024

Fix incorrect uses of math/rand:

Fix incorrect uses of math/rand:
- do not call rand.Seed() in a test as it affects the global pseudo-random number
  generator and might affect other tests (or Logrus itself). Instead, use a local
  instance of a number generator
- seed with time.Now().UnixNano() instead of time.Now().Unix() for more
  randomness
- use "rand.Intn(100)" instead of "rand.Int() % 100"
Copy link
Collaborator

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 21bae50 into sirupsen:master Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants