From a12da586e9eb271ea31365257399fda8437dd3ea Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Jun 2019 20:55:21 -0700 Subject: handle int64 Signed-off-by: Jeff Carr --- chomp.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'chomp.go') diff --git a/chomp.go b/chomp.go index cacfdcf..da4fe9e 100644 --- a/chomp.go +++ b/chomp.go @@ -61,15 +61,11 @@ func Chomp(a interface{}) string { return perlChomp(s) case uint64: log.Printf("shell.Chomp() FOUND []uint64") - var tmp uint64 - tmp = a.(uint64) - s := string(tmp) + s := fmt.Sprintf("%d", a.(uint64)) return perlChomp(s) case int64: - log.Printf("shell.Chomp() FOUND []uint64") - var tmp int64 - tmp = a.(int64) - s := string(tmp) + log.Printf("shell.Chomp() FOUND []int64") + s := fmt.Sprintf("%d", a.(int64)) return perlChomp(s) case *bytes.Buffer: log.Printf("shell.Chomp() FOUND *bytes.Buffer") -- cgit v1.2.3