From 38b6cb35e703377cce14b507be601e176face8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Fri, 20 Jan 2023 11:52:27 +0100 Subject: [PATCH] Add the float cast function to workflow gval handlers --- server/pkg/expr/func_num.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/pkg/expr/func_num.go b/server/pkg/expr/func_num.go index fde3a357a..0d24c3a79 100644 --- a/server/pkg/expr/func_num.go +++ b/server/pkg/expr/func_num.go @@ -5,6 +5,7 @@ import ( "math/rand" "github.com/PaesslerAG/gval" + "github.com/cortezaproject/corteza/server/pkg/gvalfnc" "github.com/pkg/errors" "github.com/spf13/cast" ) @@ -24,6 +25,7 @@ func NumericFunctions() []gval.Language { gval.Function("average", average), gval.Function("random", random), gval.Function("int", toInt64), + gval.Function("float", gvalfnc.CastFloat), } }