diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2023-11-28 15:17:18 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2023-11-28 15:17:18 +0530 |
commit | 82d5136c1b03efbb99931884dd75ab1160689ceb (patch) | |
tree | 3095f344055c4ad54a8238599839fa0088054fbd /idgen/id_generator.go | |
parent | a3ead3d67520704eda55a74841b00d5766728fab (diff) |
Refactoring project - Introducing handlers,models and utils- Updating previous hasher and idgen func + formatting
Diffstat (limited to 'idgen/id_generator.go')
-rw-r--r-- | idgen/id_generator.go | 24 |
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) -} |