mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
use errors.New when not formatting
This commit is contained in:
@@ -2,7 +2,7 @@ package processor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"errors"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
@@ -38,13 +38,13 @@ func init() {
|
||||
expression, ok := params["expression"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("script.expr requires an expression parameter")
|
||||
return nil, errors.New("script.expr requires an expression parameter")
|
||||
}
|
||||
|
||||
expressionString, ok := expression.(string)
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("script.expr expression must be a string")
|
||||
return nil, errors.New("script.expr expression must be a string")
|
||||
}
|
||||
|
||||
program, err := expr.Compile(expressionString)
|
||||
|
||||
Reference in New Issue
Block a user