support anchor in filedspec

This commit is contained in:
Donny Xia
2021-01-22 11:01:07 -08:00
parent 021c3ce3fc
commit ef89df6123
2 changed files with 69 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ func (fltr Filter) filter(obj *yaml.RNode) error {
return fltr.seq(obj)
case yaml.MappingNode:
return fltr.field(obj)
case yaml.AliasNode:
return fltr.filter(yaml.NewRNode(obj.YNode().Alias))
default:
return errors.Errorf("expected sequence or mapping node")
}