From 402be864043f4624570d2c56dcfbe1d1de589ac1 Mon Sep 17 00:00:00 2001 From: timerzz Date: Sun, 1 Sep 2024 16:28:17 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=8A=8A=E4=BB=B7=E6=A0=BC=E6=94=B9?= =?UTF-8?q?=E4=B8=BAfloat64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/v2/calculate-process.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structs/v2/calculate-process.go b/structs/v2/calculate-process.go index 2816eb8..63073cc 100644 --- a/structs/v2/calculate-process.go +++ b/structs/v2/calculate-process.go @@ -37,7 +37,7 @@ func (c *CalculateProcess) Run(env map[string]float64) (string, float64) { return "", 0 } } - program, err := expr.Compile(c.Process, expr.AsInt()) + program, err := expr.Compile(c.Process, expr.AsFloat64()) if err != nil { return fmt.Sprintf("【%s】 process compile error: %v", c.Name, err), 0 }