WIP cmd/cli$ go run ../ cli $(printf " -f %s" $HOME/Sync/Core/ledger/eras/2022-/*.txt) -n -w ^Housey --depth 1 -usd bal
All checks were successful
cicd / ci (push) Successful in 1m32s
All checks were successful
cicd / ci (push) Successful in 1m32s
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type Query struct{}
|
||||
|
||||
func BuildQuery(args args) (ledger.Like, error) {
|
||||
func BuildQuery(config Config, args args) (ledger.Like, error) {
|
||||
var result ledger.Like
|
||||
var err error
|
||||
func() {
|
||||
@@ -18,12 +18,12 @@ func BuildQuery(args args) (ledger.Like, error) {
|
||||
err = fmt.Errorf("panicked: %v", err)
|
||||
}
|
||||
}()
|
||||
result, err = buildQuery(args)
|
||||
result, err = buildQuery(config, args)
|
||||
}()
|
||||
return result, err
|
||||
}
|
||||
|
||||
func buildQuery(args args) (ledger.Like, error) {
|
||||
func buildQuery(config Config, args args) (ledger.Like, error) {
|
||||
likeName := func(s string) ledger.Like {
|
||||
return ledger.LikeName(s)
|
||||
}
|
||||
@@ -71,6 +71,10 @@ func buildQuery(args args) (ledger.Like, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if config.Query.With != "" {
|
||||
like = andLike(like, ledger.LikeWith(config.Query.With))
|
||||
}
|
||||
|
||||
return like, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user