deltas.Group(GroupName("^[^:]*"))

This commit is contained in:
Bel LaPointe
2023-10-25 08:21:16 -06:00
parent 40cec44c0b
commit 54913b21c9
3 changed files with 43 additions and 0 deletions

View File

@@ -4,6 +4,15 @@ import "regexp"
type Group func(Delta) Delta
type Groups []Group
func (groups Groups) Each(d Delta) Delta {
for i := range groups {
d = groups[i](d)
}
return d
}
func GroupDate(pattern string) Group {
p := regexp.MustCompile(pattern)
return func(d Delta) Delta {