mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 10:04:43 +08:00
Updating golanglint
This commit is contained in:
@@ -26,11 +26,12 @@ func deleteChildOperator(d *dataTreeNavigator, context Context, expressionNode *
|
||||
candidatePath := candidate.GetPath()
|
||||
childPath := candidatePath[len(candidatePath)-1]
|
||||
|
||||
if parentNode.Kind == MappingNode {
|
||||
switch parentNode.Kind {
|
||||
case MappingNode:
|
||||
deleteFromMap(candidate.Parent, childPath)
|
||||
} else if parentNode.Kind == SequenceNode {
|
||||
case SequenceNode:
|
||||
deleteFromArray(candidate.Parent, childPath)
|
||||
} else {
|
||||
default:
|
||||
return Context{}, fmt.Errorf("cannot delete nodes from parent of tag %v", parentNode.Tag)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user