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

context: improve message args parsing #651

Merged
merged 1 commit into from
Feb 25, 2024
Merged

context: improve message args parsing #651

merged 1 commit into from
Feb 25, 2024

Conversation

70sh1
Copy link
Contributor

@70sh1 70sh1 commented Feb 12, 2024

This is achieved by using strings.Fields instead of strings.Split

This results in a cleaner output when parsing messages like /tags a lot of spaces

Output before: []string{"a", "", "", "", "", "", "", "", "", "", "lot", "", "", "", "", "", "", "", "", "of", "", "", "", "", "", "", "", "spaces"}

Output after the change: []string{"a", "lot", "of", "spaces"}

This us achieved by using strings.Fields instead of strings.Split

This results in a cleaner output when parsing messages like "/tags a          lot         of        spaces"

Output before: `[]string{"a", "", "", "", "", "", "", "", "", "", "lot", "", "", "", "", "", "", "", "", "of", "", "", "", "", "", "", "", "spaces"}`

Output after the change: `[]string{"a", "lot", "of", "spaces"}`
@demget demget changed the title Improve Args payload parsing context: improve message args parsing Feb 20, 2024
@demget demget added this to the v3.3 milestone Feb 20, 2024
@demget demget merged commit 06bef0a into tucnak:v3 Feb 25, 2024
1 check passed
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