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 padding around app name in startup message when containing non-ascii characters #1987

Merged
merged 4 commits into from Aug 1, 2022

Conversation

Maxi-Mega
Copy link
Contributor

When the app name contains non-ascii chars (that are stored on more than 1 byte) , the padding around it in the startup message becomes incorrect. The veritable length of the app name can be obtained by getting the length of the underlying rune slice, like len([]rune(s)).

I added a test (Test_App_Master_Process_Show_Startup_MessageWithAppNameNonAscii) that creates an app with a name containing accentuated letters.

@welcome
Copy link

welcome bot commented Jul 27, 2022

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ReneWerner87
Copy link
Member

ReneWerner87 commented Aug 1, 2022

@Maxi-Mega can you refresh ? after the merge of #1977 there are conflicts

@Maxi-Mega
Copy link
Contributor Author

@Maxi-Mega can you refresh ? after the merge of #1977 there are conflicts

Done, tell me if everything's ok

app_test.go Outdated Show resolved Hide resolved
@efectn efectn merged commit e49880c into gofiber:master Aug 1, 2022
@welcome
Copy link

welcome bot commented Aug 1, 2022

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

trim21 pushed a commit to trim21/fiber that referenced this pull request Aug 15, 2022
…ascii characters (gofiber#1987)

* Fix padding around app name in startup message when it contains non-ascii characters

* fix conflict, allow ending space only for odd length strings

* move startup message tests to listen_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants