Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks/test: fix incorrect use of math/rand #1426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 11, 2024

  1. hooks/test: fix incorrect use 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"
    dolmen committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    857f924 View commit details
    Browse the repository at this point in the history