deltas.Group(GroupName("^[^:]*"))
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user