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

Fix game.RandomHex() to return a string of correct length #87

Merged
merged 4 commits into from
Apr 4, 2024

Conversation

makiuchi-d
Copy link
Member

game.RandomHex(n int) の返す文字列が2nになってしまっていたのを修正しました

RandomHexで生成していたのは次の2箇所です

  • RoomID
    • これまで通り32文字になるようconstを修正
  • クライアントのAuthKey
    • configでの指定値の倍の長さになっていたのが指定値通りに
    • 無指定の場合これまでと同じ長さになるよう初期値を修正

ついでにRoomIDの長さや正規表現のconstをcommonパッケージに移して共通化しました

@makiuchi-d makiuchi-d requested a review from methane April 3, 2024 12:22
@makiuchi-d makiuchi-d merged commit c9027d3 into main Apr 4, 2024
5 checks passed
@makiuchi-d makiuchi-d deleted the fix-random-hex-length branch April 4, 2024 11:36
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