whois/utils/random_id.go
Elizabeth Hunt d25ec27fb1
Some checks failed
continuous-integration/drone/push Build is failing
initial commit by simponic-infra
2025-01-05 16:39:13 -08:00

17 lines
189 B
Go

package utils
import (
"crypto/rand"
"fmt"
)
func RandomId() string {
id := make([]byte, 16)
_, err := rand.Read(id)
if err != nil {
panic(err)
}
return fmt.Sprintf("%x", id)
}