Is your feature request related to a problem? Please describe.
Is it possible to opt in to following aliases when looking for nodes? For instance, if I have the following path $.production.foo and YAML structure
default: &default
foo: bar
production:
<<: *default
I’d like to get the bar node without changing the path from $.production.foo to $.default.foo.
Describe the solution you'd like
API could possibly be as follows:
const data = `
default: &default
foo: bar
production:
<<: *default
`
var node yaml.Node
yaml.Unmarshal([]byte(data), &node)
p, _ := yamlpath.NewPath("$.production.foo")
p.FollowAliases(true) // new func that toggles this behaviour.
nodes, _ := p.Find(&node)
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem? Please describe.
Is it possible to opt in to following aliases when looking for nodes? For instance, if I have the following path
$.production.fooand YAML structureI’d like to get the
barnode without changing the path from$.production.footo$.default.foo.Describe the solution you'd like
API could possibly be as follows:
Describe alternatives you've considered
No response
Additional context
No response