mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
fix: ConvertToFloat64Slice
This commit is contained in:
@@ -396,6 +396,9 @@ func ConvertToFloat64(val interface{}) (float64, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ConvertToFloat64Slice(val interface{}) ([]float64, error) {
|
func ConvertToFloat64Slice(val interface{}) ([]float64, error) {
|
||||||
|
if paramsSlice, ok := val.([]float64); ok {
|
||||||
|
return paramsSlice, nil
|
||||||
|
}
|
||||||
paramsSlice, ok := val.([]interface{})
|
paramsSlice, ok := val.([]interface{})
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, errors.New("val is not slice")
|
return nil, errors.New("val is not slice")
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v5.0.0+2412241743
|
v5.0.0+2412252005
|
||||||
|
|||||||
Reference in New Issue
Block a user