增加number / double支持

This commit is contained in:
白茶清欢 2023-05-04 18:04:47 +08:00
parent 01b6e1abe8
commit 6130732a90
2 changed files with 7 additions and 1 deletions

View File

@ -30,7 +30,7 @@ const (
DataTypeFloat32 = "float32"
DataTypeFloat64 = "float64"
DataTypeDouble = "float64"
DataTypeDouble = "double"
DataTypeFloat = "float"
DataTypeIntSlice = "[]int"

View File

@ -220,6 +220,12 @@ func (f *filter) getValue(dataType string, sourceValue gjson.Result, defaultValu
case DataTypeFloat32:
fallthrough
case DataTypeFloat64:
fallthrough
case DataTypeFloat:
fallthrough
case DataTypeDouble:
fallthrough
case DataTypeNumber:
var (
err error
val float64