Added key operator

This commit is contained in:
Mike Farah
2021-11-24 09:57:35 +11:00
parent 7f629d5e36
commit b44fecdfa5
27 changed files with 149 additions and 48 deletions
+2 -2
View File
@@ -49,10 +49,10 @@ func subtract(d *dataTreeNavigator, context Context, lhs *CandidateNode, rhs *Ca
lhsNode := lhs.Node
if lhsNode.Tag == "!!null" {
return lhs.CreateChild(nil, rhs.Node), nil
return lhs.CreateReplacement(rhs.Node), nil
}
target := lhs.CreateChild(nil, &yaml.Node{})
target := lhs.CreateReplacement(&yaml.Node{})
switch lhsNode.Kind {
case yaml.MappingNode: