Skip to content

Commit

Permalink
feat: add AlphaNumNoAmbiguous rune set to randx (#836)
Browse files Browse the repository at this point in the history
The visually ambiguous characters were suggested by ChatGPT.

https://chatgpt.com/share/67979762-832c-800e-8ccf-8a0c1d3b0ce0
  • Loading branch information
alnr authored Jan 28, 2025
1 parent 58ffe53 commit 8c9dd01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions randx/sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ var (
AlphaUpper = []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
// Numeric contains runes [0123456789].
Numeric = []rune("0123456789")
// AlphaNumNoAmbiguous is equivalent to AlphaNum but without visually ambiguous characters [0Oo1IlB8S5Z2].
AlphaNumNoAmbiguous = []rune("abcdefghijkmnpqrstuvwxyzACDEFGHJKLMNPQRTUVWXY34679")
)

// RuneSequence returns a random sequence using the defined allowed runes.
Expand Down

0 comments on commit 8c9dd01

Please sign in to comment.