Elizabeth Hunt
f163a24279
All checks were successful
continuous-integration/drone/push Build is passing
17 lines
189 B
Go
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)
|
|
}
|