Exemplo n.º 1
0
func (e Environment) FindReference(path []string) (yaml.Node, bool) {
	root, found := resolveSymbol(path[0], e.Scope)
	if !found {
		return nil, false
	}

	return yaml.Find(root, path[1:]...)
}
Exemplo n.º 2
0
func (e Environment) FindInStubs(path []string) (yaml.Node, bool) {
	for _, stub := range e.Stubs {
		val, found := yaml.Find(stub, path...)
		if found {
			return val, true
		}
	}

	return nil, false
}
Exemplo n.º 3
0
func (e Environment) FindFromRoot(path []string) (yaml.Node, bool) {
	return yaml.Find(e.Scope[0], path...)
}