func keyValuePairFromContent(content []*yaml.Node, index int) (*yaml.Node, *yaml.Node) {
	key := content[index]
	val := content[index+1]
	return key, val
}
Get key and value nodes from content array, bounds chechking should be
done before function call
package search
import (
	"fmt"
	"io/ioutil"
	"strconv"
	"gopkg.in/yaml.v3"
)
type KeyValue struct {
	key   *yaml.Node
	value *yaml.Node
}
func newPair(ky, val *yaml.Node) *KeyValue {
	return &KeyValue{
		key:   ky,
		value: val,
	}
}
func MakeNode(filePath string) (*yaml.Node, error) {
	var node yaml.Node
	data, err := ioutil.ReadFile(filePath)
	if err != nil {
		return nil, err
	}
	marshErr := yaml.Unmarshal(data, &node)
	return &node, marshErr
}
func FindKey(node *yaml.Node, path ...string) (int, int, error) {
	var line, col int
	node, searchErr := findComponent(node, path...)
	if searchErr != nil {
		return line, col, searchErr
	}
	line = node.Line
	col = node.Column
	return line, col, nil
}
func findComponent(node *yaml.Node, path ...string) (*yaml.Node, error) {
	if len(path) == 0 {
		return node, nil
	}
	if node.Kind == yaml.SequenceNode {
		ind, err := strconv.Atoi(path[0])
		if err != nil || ind >= len(node.Content) || ind < 0 {
			return nil, fmt.Errorf("invalid index parsed %s", path[0])
		}
		return findComponent(node.Content[ind], path[1:]...)
	}
	if foundKeyVal, ok := mapKeyValuePairs(node.Content)[path[0]]; ok {
		return resolveMatchingPath(foundKeyVal, path...)
	}
	return nil, fmt.Errorf("unable to find yaml node %s", path[0])
}
func mapKeyValuePairs(content []*yaml.Node) map[string]*KeyValue {
	var keyNodePair map[string]*KeyValue = make(map[string]*KeyValue)
	for i := 0; i < len(content)-1; i += 2 {
		ky, val := keyValuePairFromContent(content, i)
		keyNodePair[ky.Value] = newPair(ky, val)
	}
	return keyNodePair
}
func resolveMatchingPath(keyVal *KeyValue, path ...string) (*yaml.Node, error) {
	if len(path) == 1 {  
		return keyVal.key, nil
	}
	return findComponent(keyVal.value, path[1:]...)
}