summaryrefslogtreecommitdiff
path: root/int.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-25 00:39:14 -0600
committerJeff Carr <[email protected]>2024-01-25 00:39:14 -0600
commit41fe4a4659d50d70a835224405490588019d24ff (patch)
treedd6677fb17d11a4233568fddf0d3a141434bba10 /int.go
parente24c2c2eb3feb5083a74a9b2cb396bcbcb0ac52d (diff)
new homev0.13.0
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'int.go')
-rw-r--r--int.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/int.go b/int.go
index dcf6b1e..bf78209 100644
--- a/int.go
+++ b/int.go
@@ -1,6 +1,6 @@
package shell
-/*
+/*
send it anything, always get back an int
*/
@@ -13,7 +13,7 @@ import "strconv"
func Int(s string) int {
s = Chomp(s)
i, err := strconv.Atoi(s)
- if (err != nil) {
+ if err != nil {
handleError(err, -1)
return 0
}
@@ -23,7 +23,7 @@ func Int(s string) int {
func Int64(s string) int64 {
s = Chomp(s)
i, err := strconv.Atoi(s)
- if (err != nil) {
+ if err != nil {
handleError(err, -1)
return 0
}