From 6130732a90696732b55afca2a6dab990a6957991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Thu, 4 May 2023 18:04:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0number=20/=20double=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- const.go | 2 +- filter.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/const.go b/const.go index f104534..6474405 100644 --- a/const.go +++ b/const.go @@ -30,7 +30,7 @@ const ( DataTypeFloat32 = "float32" DataTypeFloat64 = "float64" - DataTypeDouble = "float64" + DataTypeDouble = "double" DataTypeFloat = "float" DataTypeIntSlice = "[]int" diff --git a/filter.go b/filter.go index 354f819..426cad0 100644 --- a/filter.go +++ b/filter.go @@ -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