fix:修复错误检查

This commit is contained in:
rulego-team
2025-06-13 21:38:27 +08:00
parent f8b4924d03
commit b481b5a675
6 changed files with 206 additions and 146 deletions

View File

@ -241,11 +241,11 @@ func (f *CustomGeometricMeanFunction) Clone() AggregatorFunction {
// RegisterCustomFunctions 注册自定义函数的示例
func RegisterCustomFunctions() {
// 注册自定义聚合函数
Register(NewCustomProductFunction())
Register(NewCustomGeometricMeanFunction())
_ = Register(NewCustomProductFunction())
_ = Register(NewCustomGeometricMeanFunction())
// 注册自定义分析函数
Register(NewCustomMovingAverageFunction(5)) // 5个值的移动平均
_ = Register(NewCustomMovingAverageFunction(5)) // 5个值的移动平均
// 注册适配器
RegisterAggregatorAdapter("product")

View File

@ -353,8 +353,6 @@ func (f *ChrFunction) Execute(ctx *FunctionContext, args []interface{}) (interfa
return string(rune(code)), nil
}
// UrlEncodeFunction URL编码函数
type UrlEncodeFunction struct {
*BaseFunction