Skip to content

Conversation

@jdleo
Copy link
Owner

@jdleo jdleo commented Oct 19, 2025

  • Introduced character set constants for improved readability and maintainability.
  • Updated IDGen struct for backward compatibility while promoting the use of package constants.
  • Enhanced Generate and GenerateUnsecure methods with better error handling and optimized random byte generation.
  • Added support for power-of-2 length alphabets to improve performance in ID generation.

- Introduced character set constants for improved readability and maintainability.
- Updated IDGen struct for backward compatibility while promoting the use of package constants.
- Enhanced Generate and GenerateUnsecure methods with better error handling and optimized random byte generation.
- Added support for power-of-2 length alphabets to improve performance in ID generation.
@jdleo jdleo self-assigned this Oct 19, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 3 to +6
import (
"crypto/rand"
"errors"
rand2 "math/rand"
"time"
rand2 "math/rand/v2"

Choose a reason for hiding this comment

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

P1 Badge Update minimum Go version when importing math/rand/v2

Switching the unsecure generator to math/rand/v2 implicitly raises the minimum supported Go version to 1.22+, but the module still advertises Go 1.16 and nothing else in the change communicates a version bump. Consumers compiling this library with Go 1.16–1.21 will now fail with cannot find package math/rand/v2. Either keep using the original math/rand API or update go.mod/documentation to reflect the newer requirement.

Useful? React with 👍 / 👎.

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