mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-13 11:55:38 +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)
|
log.Debug("should I traverse? %v", head)
|
||||||
DebugNode(value)
|
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!")
|
log.Debug("yep!")
|
||||||
traversedEntry = true
|
traversedEntry = true
|
||||||
contents[indexInMap+1] = n.getOrReplace(contents[indexInMap+1], guessKind(tail, contents[indexInMap+1].Kind))
|
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 {
|
} else {
|
||||||
log.Debug("nope not traversing")
|
log.Debug("nope not traversing")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user