Skip to content

Commit

Permalink
Add missing docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
BooleanCat committed Aug 23, 2024
1 parent 244804c commit bc4c7df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions it/filter/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ func Or[T any](filters ...func(T) bool) func(T) bool {
}
}

// Match returns a function that returns true when the provided string or byte
// slice matches a pattern. See [regexp.MatchString].
func Match[T string | []byte](pattern *regexp.Regexp) func(T) bool {
return func(term T) bool {
return pattern.MatchString(string(term))
Expand Down

0 comments on commit bc4c7df

Please sign in to comment.