summaryrefslogtreecommitdiff
path: root/idgen
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-11-28 15:17:18 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-11-28 15:17:18 +0530
commit82d5136c1b03efbb99931884dd75ab1160689ceb (patch)
tree3095f344055c4ad54a8238599839fa0088054fbd /idgen
parenta3ead3d67520704eda55a74841b00d5766728fab (diff)
Refactoring project - Introducing handlers,models and utils- Updating previous hasher and idgen func + formatting
Diffstat (limited to 'idgen')
-rw-r--r--idgen/id_generator.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/idgen/id_generator.go b/idgen/id_generator.go
deleted file mode 100644
index 3659d0e..0000000
--- a/idgen/id_generator.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package idgen
-
-import (
- "math/rand"
- "time"
-)
-
-const (
- chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-
- idLength = 8
-)
-
-func init() {
- rand.Seed(time.Now().UnixNano())
-}
-
-func GenerateID() string {
- id := make([]byte, idLength)
- for i := 0; i < idLength; i++ {
- id[i] = chars[rand.Intn(len(chars))]
- }
- return string(id)
-}