Remove path based task lookup

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
Helder Correia
2022-03-09 11:29:26 -01:00
parent 17c45ea36c
commit 34b6c289dd
7 changed files with 71 additions and 109 deletions

View File

@@ -101,19 +101,6 @@ func (f Field) Label() string {
return l
}
// ParentLabel returns the unquoted parent selector of a value
func (v *Value) ParentLabel(depth int) string {
sel := v.Path().Selectors()
if depth > len(sel) {
return ""
}
l := sel[len(sel)-depth].String()
if unquoted, err := strconv.Unquote(l); err == nil {
return unquoted
}
return l
}
// Proxy function to the underlying cue.Value
// Field ordering is guaranteed to be stable.
func (v *Value) Fields(opts ...cue.Option) ([]Field, error) {