mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-02 15:14:52 +08:00
Added key operator
This commit is contained in:
@@ -61,7 +61,7 @@ func encodeOperator(d *dataTreeNavigator, context Context, expressionNode *Expre
|
||||
}
|
||||
|
||||
stringContentNode := &yaml.Node{Kind: yaml.ScalarNode, Tag: "!!str", Value: stringValue}
|
||||
results.PushBack(candidate.CreateChild(nil, stringContentNode))
|
||||
results.PushBack(candidate.CreateReplacement(stringContentNode))
|
||||
}
|
||||
return context.ChildContext(results), nil
|
||||
}
|
||||
@@ -85,7 +85,7 @@ func decodeOperator(d *dataTreeNavigator, context Context, expressionNode *Expre
|
||||
//first node is a doc
|
||||
node := unwrapDoc(&dataBucket)
|
||||
|
||||
results.PushBack(candidate.CreateChild(nil, node))
|
||||
results.PushBack(candidate.CreateReplacement(node))
|
||||
}
|
||||
return context.ChildContext(results), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user