summaryrefslogtreecommitdiffstats
path: root/pkg/utils
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-15 11:18:40 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-15 11:41:37 +1000
commit826d1660c97b7c5c55420ffed21eaa5f16118118 (patch)
tree8f2f65a3d2617aa242034273c4a41b6ec5aea659 /pkg/utils
parent291a8e4de0f5d5557cf6fbd7b5b6b9d42bcaa16e (diff)
move patch stuff into its own package
Diffstat (limited to 'pkg/utils')
-rw-r--r--pkg/utils/utils.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go
index 6eca59a6b..12c89e5da 100644
--- a/pkg/utils/utils.go
+++ b/pkg/utils/utils.go
@@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"regexp"
+ "strconv"
"strings"
"time"
@@ -334,3 +335,11 @@ func StringArraysOverlap(strArrA []string, strArrB []string) bool {
return false
}
+
+func MustConvertToInt(s string) int {
+ i, err := strconv.Atoi(s)
+ if err != nil {
+ panic(err)
+ }
+ return i
+}