Tuned up local file handling and cleaned things up

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-11-22 12:37:25 -05:00
parent ab4af83649
commit f56cdeae9e
17 changed files with 208 additions and 111 deletions

View File

@@ -78,13 +78,7 @@ func (index *SpecIndex) FindNodeOrigin(node *yaml.Node) *NodeOrigin {
if index.nodeMap[node.Line][node.Column] != nil {
foundNode := index.nodeMap[node.Line][node.Column]
match := true
if foundNode.Value != node.Value {
match = false
}
if foundNode.Kind != node.Kind {
match = false
}
if foundNode.Tag != node.Tag {
if foundNode.Value != node.Value || foundNode.Kind != node.Kind || foundNode.Tag != node.Tag {
match = false
}
if len(foundNode.Content) == len(node.Content) {