Skip to content

Commit 7724a2a

Browse files
authored
Revert "bugfix - resolve issue #1155"
This reverts commit fa9da57.
1 parent c87bdf0 commit 7724a2a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

core/util/util.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,14 @@ func jsonPath(query, toMatch string) interface{} {
399399
return ""
400400
}
401401

402-
//// Jsonpath library converts large int into a string with scientific notion, the following
403-
//// reverts that process to avoid mismatching when using the jsonpath result for csv data lookup
404-
//floatResult, err := strconv.ParseFloat(result, 64)
405-
//// if the string is a float and a whole number
406-
//if err == nil && floatResult == float64(int64(floatResult)) {
407-
// intResult := int(floatResult)
408-
// result = strconv.Itoa(intResult)
409-
//}
402+
// Jsonpath library converts large int into a string with scientific notion, the following
403+
// reverts that process to avoid mismatching when using the jsonpath result for csv data lookup
404+
floatResult, err := strconv.ParseFloat(result, 64)
405+
// if the string is a float and a whole number
406+
if err == nil && floatResult == float64(int64(floatResult)) {
407+
intResult := int(floatResult)
408+
result = strconv.Itoa(intResult)
409+
}
410410

411411
// convert to array data if applicable
412412
var data interface{}

0 commit comments

Comments
 (0)