Skip to content

refactor: replace magic number 128 with unicode.MaxASCII in AsciiJSON render - #4224

Merged
appleboy merged 1 commit into
gin-gonic:masterfrom
1911860538:render-asciijson
Apr 21, 2025
Merged

appleboy merged 1 commit into
gin-gonic:masterfrom
1911860538:render-asciijson

Conversation

@1911860538

Copy link
Copy Markdown
Contributor

This change improves code clarity by replacing the hardcoded ASCII boundary check (r >= 128)
with the semantic constant unicode.MaxASCII, making the intention of the condition more explicit.

@appleboy appleboy added this to the v1.11 milestone Apr 21, 2025
@appleboy
appleboy merged commit 67c9d4e into gin-gonic:master Apr 21, 2025
@1911860538
1911860538 deleted the render-asciijson branch August 6, 2025 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants