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

Refine Luhn Number Generator #210

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

MatsuoTakuro
Copy link
Collaborator

@MatsuoTakuro MatsuoTakuro commented Sep 18, 2024

  • Add some constraint logics related to length of input for number generator.
  • Use rand.Intn(10) instead of rand.New(src Source) and r.Intn(9).
    • To include 9 cuz n value cannot be generated in random way by the Intn func.
    • For more performance and still concurrent safe way.
  • Use testify in testing for more ease of writing and readability.

@tanvir-retailai tanvir-retailai merged commit a828da2 into develop Sep 18, 2024
1 check passed
@tanvir-retailai tanvir-retailai deleted the feat/refine-luhn-number-generator branch September 18, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants