UnwrapDoc now private

This commit is contained in:
Mike Farah
2021-02-11 10:58:40 +11:00
parent ba223df4ac
commit b749973fe0
17 changed files with 27 additions and 27 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ func deleteImmediateChildOperator(d *dataTreeNavigator, matchingNodes *list.List
for el := parents.Front(); el != nil; el = el.Next() {
parent := el.Value.(*CandidateNode)
parentNode := UnwrapDoc(parent.Node)
parentNode := unwrapDoc(parent.Node)
if parentNode.Kind == yaml.MappingNode {
deleteFromMap(parent, childPath)
} else if parentNode.Kind == yaml.SequenceNode {
@@ -64,7 +64,7 @@ func deleteImmediateChildOperator(d *dataTreeNavigator, matchingNodes *list.List
func deleteFromMap(candidate *CandidateNode, childPath interface{}) {
log.Debug("deleteFromMap")
node := UnwrapDoc(candidate.Node)
node := unwrapDoc(candidate.Node)
contents := node.Content
newContents := make([]*yaml.Node, 0)
@@ -87,7 +87,7 @@ func deleteFromMap(candidate *CandidateNode, childPath interface{}) {
func deleteFromArray(candidate *CandidateNode, childPath interface{}) {
log.Debug("deleteFromArray")
node := UnwrapDoc(candidate.Node)
node := unwrapDoc(candidate.Node)
contents := node.Content
newContents := make([]*yaml.Node, 0)