From dfae593e8671bd14ac5325b8c1b986b44c217dd3 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Sun, 21 Jul 2024 16:35:13 +0200 Subject: [PATCH] operand-iterator.go: removed commented code --- operand-iterator.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/operand-iterator.go b/operand-iterator.go index 150e9d6..369a438 100644 --- a/operand-iterator.go +++ b/operand-iterator.go @@ -66,7 +66,7 @@ func evalFirstChild(ctx ExprContext, iteratorTerm *term) (value any, err error) func getDataSourceDict(iteratorTerm *term, firstChildValue any) (ds map[string]Functor, err error) { if dictAny, ok := firstChildValue.(*DictType); ok { - requiredFields := []string{/*CurrentName,*/ NextName} + requiredFields := []string{NextName} fieldsMask := 0b1 foundFields := 0 ds = make(map[string]Functor) @@ -88,7 +88,6 @@ func getDataSourceDict(iteratorTerm *term, firstChildValue any) (ds map[string]F missingFields = append(missingFields, field) } } -// err = fmt.Errorf("the data-source must provide a non-nil %q operator(s)", strings.Join(missingFields, ", ")) err = iteratorTerm.children[0].Errorf("the data-source must provide a non-nil %q operator(s)", strings.Join(missingFields, ", ")) } } @@ -127,14 +126,8 @@ func evalIterator(ctx ExprContext, opTerm *term) (v any, err error) { dcCtx := ctx.Clone() exportObjects(dcCtx, initCtx) dc = NewDataCursor(dcCtx, ds, resource) - //exportObjects(dc.ctx, initCtx) } - // dc.nextFunc = ds[NextName] - // dc.currentFunc = ds[CurrentName] - // dc.cleanFunc = ds[CleanName] - // dc.resetFunc = ds[ResetName] - v = dc } else if list, ok := firstChildValue.(*ListType); ok { var args []any