mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-07 10:54:51 +08:00
Replace gopkg.in/op/go-logging.v1 with log/slog (#2635)
* Initial plan * Replace gopkg.in/op/go-logging.v1 with log/slog Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com> Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/aa9c12f4-21b9-4633-9868-6b56585b247f --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>
This commit is contained in:
co-authored by
mikefarah
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
parent
11f4dc1a03
commit
7d8d3ab902
@@ -4,21 +4,21 @@ import "container/list"
|
||||
|
||||
func unionOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
||||
log.Debug("unionOperator--")
|
||||
log.Debug("unionOperator: context: %v", NodesToString(context.MatchingNodes))
|
||||
log.Debugf("unionOperator: context: %v", NodesToString(context.MatchingNodes))
|
||||
lhs, err := d.GetMatchingNodes(context, expressionNode.LHS)
|
||||
if err != nil {
|
||||
return Context{}, err
|
||||
}
|
||||
log.Debug("unionOperator: lhs: %v", NodesToString(lhs.MatchingNodes))
|
||||
log.Debug("unionOperator: rhs input: %v", NodesToString(context.MatchingNodes))
|
||||
log.Debug("unionOperator: rhs: %v", expressionNode.RHS.Operation.toString())
|
||||
log.Debugf("unionOperator: lhs: %v", NodesToString(lhs.MatchingNodes))
|
||||
log.Debugf("unionOperator: rhs input: %v", NodesToString(context.MatchingNodes))
|
||||
log.Debugf("unionOperator: rhs: %v", expressionNode.RHS.Operation.toString())
|
||||
rhs, err := d.GetMatchingNodes(context, expressionNode.RHS)
|
||||
|
||||
if err != nil {
|
||||
return Context{}, err
|
||||
}
|
||||
log.Debug("unionOperator: lhs: %v", lhs.ToString())
|
||||
log.Debug("unionOperator: rhs: %v", rhs.ToString())
|
||||
log.Debugf("unionOperator: lhs: %v", lhs.ToString())
|
||||
log.Debugf("unionOperator: rhs: %v", rhs.ToString())
|
||||
|
||||
results := lhs.ChildContext(list.New())
|
||||
for el := lhs.MatchingNodes.Front(); el != nil; el = el.Next() {
|
||||
@@ -33,11 +33,11 @@ func unionOperator(d *dataTreeNavigator, context Context, expressionNode *Expres
|
||||
|
||||
for el := rhs.MatchingNodes.Front(); el != nil; el = el.Next() {
|
||||
node := el.Value.(*CandidateNode)
|
||||
log.Debug("union operator rhs: processing %v", NodeToString(node))
|
||||
log.Debugf("union operator rhs: processing %v", NodeToString(node))
|
||||
|
||||
results.MatchingNodes.PushBack(node)
|
||||
}
|
||||
}
|
||||
log.Debug("union operator: all together: %v", results.ToString())
|
||||
log.Debugf("union operator: all together: %v", results.ToString())
|
||||
return results, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user