summaryrefslogtreecommitdiff
path: root/idgen
diff options
context:
space:
mode:
Diffstat (limited to 'idgen')
-rw-r--r--idgen/id_generator.go5
1 files changed, 0 insertions, 5 deletions
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++ {