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

Filter snippets by tag -> pet list -t $tag #329 #334

Merged
merged 4 commits into from
Dec 7, 2024

Conversation

a2xdeveloper
Copy link

Issue #, if available:
#329
Description of changes:

Added support of tag filtering on list command

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@RamiAwar
Copy link
Collaborator

RamiAwar commented Dec 7, 2024

Thanks for this! Added a few small touches:

  • Tests
  • Changed function to return the filtered snippets instead of changing in-place. This is a bit more like Go philosophically - more functional, less susceptible to bugs. Changing in-place is tricky.
  • Used the new stdlib "slices" to call Contains instead of defining one ourselves.

@RamiAwar RamiAwar merged commit 321f94e into knqyf263:main Dec 7, 2024
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.

2 participants