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

Use strings.Cut to simplify logic #619

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Conversation

majst01
Copy link
Contributor

@majst01 majst01 commented Jun 8, 2022

One of the glory enhancements of go-1.18 was the introduction of strings.Cut which reduces the burden of counting the length of the result slice, also makes code much more readable in such cases where only two results are expected.

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

@majst01 majst01 requested review from juanfont and kradalby as code owners June 8, 2022 16:11
Copy link
Collaborator

@kradalby kradalby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh nice

@majst01
Copy link
Contributor Author

majst01 commented Jun 9, 2022

Integration tests are broken, anything i can do about that ?

@juanfont juanfont merged commit e918ea8 into juanfont:main Jun 9, 2022
@juanfont
Copy link
Owner

juanfont commented Jun 9, 2022

@majst01 they just a bit broken. They need some nudges, but end up working...

@majst01 majst01 deleted the simplify-split branch June 9, 2022 12:22
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.

3 participants