From e636ffa2686204778ad316aecff0e2089bca50a2 Mon Sep 17 00:00:00 2001 From: xy Date: Thu, 19 Dec 2024 04:55:46 +0900 Subject: [PATCH] Update EvaluateExpression method to use 'any' type instead of 'interface{}' --- pkl/evaluator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkl/evaluator.go b/pkl/evaluator.go index 575edc5..ff271f7 100644 --- a/pkl/evaluator.go +++ b/pkl/evaluator.go @@ -47,7 +47,7 @@ type Evaluator interface { // EvaluateExpression evaluates the provided expression on the given module source, and writes // the result into the value pointed by out. - EvaluateExpression(ctx context.Context, source *ModuleSource, expr string, out interface{}) error + EvaluateExpression(ctx context.Context, source *ModuleSource, expr string, out any) error // EvaluateExpressionRaw evaluates the provided module, and returns the underlying value's raw // bytes. @@ -94,7 +94,7 @@ func (e *evaluator) EvaluateOutputFiles(ctx context.Context, source *ModuleSourc return out, err } -func (e *evaluator) EvaluateExpression(ctx context.Context, source *ModuleSource, expr string, out interface{}) error { +func (e *evaluator) EvaluateExpression(ctx context.Context, source *ModuleSource, expr string, out any) error { bytes, err := e.EvaluateExpressionRaw(ctx, source, expr) if err != nil { return err