Added support for configurable levels of circular reference checking #113 #130

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-09-19 15:03:13 -04:00
parent 53a46f4c60
commit 715bfc3052
5 changed files with 330 additions and 20 deletions

View File

@@ -236,6 +236,9 @@ func FindKeyNodeTop(key string, nodes []*yaml.Node) (keyNode *yaml.Node, valueNo
}
if strings.EqualFold(key, v.Value) {
if i+1 >= len(nodes) {
return v, nodes[i]
}
return v, nodes[i+1] // next node is what we need.
}
}