Skip to content

feat: add support for *-word-* pattern#267

Merged
moshloop merged 4 commits into
masterfrom
handle-patt
Jun 27, 2025
Merged

feat: add support for *-word-* pattern#267
moshloop merged 4 commits into
masterfrom
handle-patt

Conversation

@yashmehrotra

Copy link
Copy Markdown
Member

No description provided.

This comment was marked as outdated.

yashmehrotra and others added 3 commits June 26, 2025 22:21
@yashmehrotra
yashmehrotra requested a review from Copilot June 26, 2025 17:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for patterns surrounded by * (e.g., *word*) in matchPattern and updates the test suite accordingly.

  • Extend matchPattern to handle patterns with both leading and trailing wildcards.
  • Adjust existing test and add a substring-wildcard test case.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
collections/slice.go Added branch to match items when pattern starts and ends with *
collections/slice_test.go Updated "Multiple Wildcards" case and added a *ppl* test
Comments suppressed due to low confidence (2)

collections/slice_test.go:70

  • [nitpick] The test name "Glob" is ambiguous; consider renaming to something like "Substring Wildcard" to more clearly describe what's being tested.
			name:     "Glob",

collections/slice_test.go:72

  • Consider adding a test case for suffix-only wildcard patterns (e.g., app*) to ensure coverage of patterns with only a trailing *.
			patterns: []string{"*ppl*"},

Comment thread collections/slice.go
@moshloop
moshloop merged commit 0e81adf into master Jun 27, 2025
6 checks passed
@moshloop
moshloop deleted the handle-patt branch June 27, 2025 06:44
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.40.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

3 participants