resolver tests all operational

time to start some cleanup.

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-10-18 12:01:06 -04:00
parent 51971762a9
commit 48c83ddb30
9 changed files with 960 additions and 855 deletions

View File

@@ -90,9 +90,9 @@ func LocateRefNode(root *yaml.Node, idx *index.SpecIndex) (*yaml.Node, error) {
}
// perform a search for the reference in the index
foundRefs := idx.SearchIndexForReference(rv)
if len(foundRefs) > 0 {
return utils.NodeAlias(foundRefs[0].Node), nil
foundRef := idx.SearchIndexForReference(rv)
if foundRef != nil {
return utils.NodeAlias(foundRef.Node), nil
}
// let's try something else to find our references.