mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
Refactor wip
This commit is contained in:
parent
cf389bed4a
commit
707ad09ba5
@ -82,11 +82,13 @@ func (n *navigator) recurseMap(value *yaml.Node, head string, tail []string, pat
|
||||
|
||||
log.Debug("should I traverse? %v", head)
|
||||
DebugNode(value)
|
||||
if n.navigationSettings.ShouldTraverse(contents[indexInMap+1], head, tail, append(pathStack, contents[indexInMap].Value)) == true {
|
||||
newPath := append(pathStack, contents[indexInMap].Value)
|
||||
|
||||
if n.navigationSettings.ShouldTraverse(contents[indexInMap+1], head, tail, newPath) == true {
|
||||
log.Debug("yep!")
|
||||
traversedEntry = true
|
||||
contents[indexInMap+1] = n.getOrReplace(contents[indexInMap+1], guessKind(tail, contents[indexInMap+1].Kind))
|
||||
return n.doTraverse(contents[indexInMap+1], head, tail, append(pathStack, contents[indexInMap].Value))
|
||||
return n.doTraverse(contents[indexInMap+1], head, tail, newPath)
|
||||
} else {
|
||||
log.Debug("nope not traversing")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user