From 23cf83254891df720003595a2cad2a00ca1ea18a Mon Sep 17 00:00:00 2001 From: Jason Harley Date: Wed, 17 Jul 2024 14:04:42 -0400 Subject: [PATCH] fix: incorrect conversion between integer types --- honeycombio/type_helpers.go | 2 +- honeycombio/type_helpers_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/honeycombio/type_helpers.go b/honeycombio/type_helpers.go index 821f87da..c8acce2e 100644 --- a/honeycombio/type_helpers.go +++ b/honeycombio/type_helpers.go @@ -19,7 +19,7 @@ func coerceValueToType(i string) interface{} { // Plugin SDK assumes 64bit so we'll do the same if v, err := strconv.ParseInt(i, 10, 64); err == nil { - return int(v) + return v } else if v, err := strconv.ParseFloat(i, 64); err == nil { return v } else if v, err := strconv.ParseBool(i); err == nil { diff --git a/honeycombio/type_helpers_test.go b/honeycombio/type_helpers_test.go index f8e43f17..1d1f79b8 100644 --- a/honeycombio/type_helpers_test.go +++ b/honeycombio/type_helpers_test.go @@ -30,12 +30,12 @@ func Test_coerceValueToType(t *testing.T) { { name: "int", input: "300", - expected: 300, + expected: int64(300), }, { name: "zero", input: "0", - expected: 0, + expected: int64(0), }, { name: "stringy number",