From 82d5136c1b03efbb99931884dd75ab1160689ceb Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Tue, 28 Nov 2023 15:17:18 +0530 Subject: Refactoring project - Introducing handlers,models and utils- Updating previous hasher and idgen func + formatting --- idgen/id_generator.go | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 idgen/id_generator.go (limited to 'idgen/id_generator.go') 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) -} -- cgit v1.2.3