summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--pkg/cetus/cetus.go8
-rw-r--r--pkg/cetus/random.go16
2 files changed, 5 insertions, 19 deletions
diff --git a/pkg/cetus/cetus.go b/pkg/cetus/cetus.go
index 7005c9d..dbf72f8 100644
--- a/pkg/cetus/cetus.go
+++ b/pkg/cetus/cetus.go
@@ -5,7 +5,7 @@ import (
 	"log"
 )
 
-var version string = "v0.4.7"
+var version string = "v0.4.8"
 
 // Version prints cetus version
 func Version() {
@@ -19,6 +19,8 @@ func PrintPath(path string) {
 
 // ErrChk logs the context & error
 func ErrChk(ctx string, err error) {
-	log.Println(ctx)
-	log.Fatal(err)
+	if err != nil {
+		log.Println(ctx)
+		log.Fatal(err)
+	}
 }
diff --git a/pkg/cetus/random.go b/pkg/cetus/random.go
deleted file mode 100644
index d77a24b..0000000
--- a/pkg/cetus/random.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package cetus
-
-import (
-	"math/rand"
-)
-
-// RandAlNum returns random alpha-numeric string of specific length
-func RandAlNum(n int) string {
-	rand.Seed(time.Now().UnixNano())
-	const alphanum = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
-	b := make([]byte, n)
-	for i := range b {
-		b[i] = letterBytes[rand.Intn(len(letterBytes))]
-	}
-	return string(b)
-}