cli graph graphs
Some checks failed
cicd / ci (push) Failing after 51s

This commit is contained in:
Bel LaPointe
2025-05-07 15:34:31 -06:00
parent 2f8dba4e23
commit 58462fb5a4
403 changed files with 226724 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
package ledger
import "regexp"
import (
"regexp"
)
type Group func(Delta) Delta
@@ -17,6 +19,9 @@ func GroupDate(pattern string) Group {
p := regexp.MustCompile(pattern)
return func(d Delta) Delta {
d.Date = p.FindString(d.Date)
for i := range d.with {
d.with[i].Date = p.FindString(d.with[i].Date)
}
return d
}
}
@@ -25,6 +30,9 @@ func GroupName(pattern string) Group {
p := regexp.MustCompile(pattern)
return func(d Delta) Delta {
d.Name = p.FindString(d.Name)
for i := range d.with {
d.with[i].Name = p.FindString(d.with[i].Name)
}
return d
}
}