first commit

This commit is contained in:
2025-05-10 17:42:25 +02:00
commit 7827b9c0cc
8 changed files with 337 additions and 0 deletions

15
pkg/tools/id/id.go Normal file
View File

@@ -0,0 +1,15 @@
package id
import (
"crypto/rand"
"encoding/hex"
)
func New() string {
bytes := make([]byte, 24)
_, err := rand.Read(bytes)
if err != nil {
panic(err)
}
return hex.EncodeToString(bytes)
}