mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-24 23:11:04 +00:00
Fixed delete splat
This commit is contained in:
parent
8be006fba4
commit
2344638da4
@ -89,7 +89,8 @@ func (n *navigator) Delete(rootNode *yaml.Node, path []string) error {
|
||||
nodeToUpdate.Content = append(original[:index], original[index+1:]...)
|
||||
|
||||
} else if nodeToUpdate.Kind == yaml.MappingNode {
|
||||
// need to delete in reverse...
|
||||
// need to delete in reverse - otherwise the matching indexes
|
||||
// become incorrect.
|
||||
matchingIndices := make([]int, 0)
|
||||
_, errorVisiting := n.visitMatchingEntries(nodeToUpdate.Content, lastBit, func(indexInMap int) error {
|
||||
matchingIndices = append(matchingIndices, indexInMap)
|
||||
|
Loading…
Reference in New Issue
Block a user