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 --- int.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'int.go') diff --git a/int.go b/int.go index 45186c7..dcf6b1e 100644 --- a/int.go +++ b/int.go @@ -19,3 +19,13 @@ func Int(s string) int { } return i } + +func Int64(s string) int64 { + s = Chomp(s) + i, err := strconv.Atoi(s) + if (err != nil) { + handleError(err, -1) + return 0 + } + return int64(i) +} -- cgit v1.2.3