Taylor Johnson
Results
3
comments of
Taylor Johnson
try add where 1 = 1. maybe can slove this problem.
> Update to v1.1.12 will resolve this problem thanks
functions := map[string]govaluate.ExpressionFunction { "timeFormat": func(args ...interface{}) (interface{}, error) { return time.Now().Format("2006-01-02 15:04:05"), nil }, } expString := "timeFormat()" expression, _ := govaluate.NewEvaluableExpressionWithFunctions(expString, functions) result, _ := expression.Evaluate(nil)