generated from smedev/Template-for-SMEServer-Core-upstream
30 lines
946 B
Diff
30 lines
946 B
Diff
|
From 6908161f1fb6713db8259909c606109770fe7673 Mon Sep 17 00:00:00 2001
|
||
|
From: Marco Vito Moscaritolo <mavimo@gmail.com>
|
||
|
Date: Mon, 11 Nov 2024 14:06:04 +0100
|
||
|
Subject: [PATCH] replace error creation
|
||
|
|
||
|
---
|
||
|
pkg/yqlib/operator_error.go | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/pkg/yqlib/operator_error.go b/pkg/yqlib/operator_error.go
|
||
|
index 1a2283de87..d6a2b67fed 100644
|
||
|
--- a/pkg/yqlib/operator_error.go
|
||
|
+++ b/pkg/yqlib/operator_error.go
|
||
|
@@ -1,7 +1,7 @@
|
||
|
package yqlib
|
||
|
|
||
|
import (
|
||
|
- "fmt"
|
||
|
+ "errors"
|
||
|
)
|
||
|
|
||
|
func errorOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
||
|
@@ -16,5 +16,5 @@ func errorOperator(d *dataTreeNavigator, context Context, expressionNode *Expres
|
||
|
if rhs.MatchingNodes.Len() > 0 {
|
||
|
errorMessage = rhs.MatchingNodes.Front().Value.(*CandidateNode).Value
|
||
|
}
|
||
|
- return Context{}, fmt.Errorf(errorMessage)
|
||
|
+ return Context{}, errors.New(errorMessage)
|
||
|
}
|