package ledger import "regexp" type Like func(Delta) bool func LikeAcc(pattern string) Like { return func(d Delta) bool { return like(pattern, d.Account) } } func like(pattern string, other string) bool { return regexp.MustCompile(pattern).MatchString(other) }