From 1b9421884f3d403e3406e61cee742bd03d3a0fa5 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Mon, 4 Sep 2023 19:05:57 +0530 Subject: Refactoring code --- idgen/id_generator.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'idgen') diff --git a/idgen/id_generator.go b/idgen/id_generator.go index 8c34f41..3659d0e 100644 --- a/idgen/id_generator.go +++ b/idgen/id_generator.go @@ -1,4 +1,3 @@ -// id_generator.go package idgen import ( @@ -7,19 +6,15 @@ import ( ) const ( - // Define the character set for the generated IDs. chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" - // Define the desired length of the generated IDs. idLength = 8 ) -// Initialize the random number generator. func init() { rand.Seed(time.Now().UnixNano()) } -// GenerateID generates a short and readable ID. func GenerateID() string { id := make([]byte, idLength) for i := 0; i < idLength; i++ { -- cgit v1.2.3