From bc4c7df82b7b79024173d7c100e56eaa33bcbf13 Mon Sep 17 00:00:00 2001 From: Tom Godkin Date: Fri, 23 Aug 2024 17:49:37 +0100 Subject: [PATCH] Add missing docstring --- it/filter/filter.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/it/filter/filter.go b/it/filter/filter.go index af7ebb9..c2d6b06 100644 --- a/it/filter/filter.go +++ b/it/filter/filter.go @@ -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))