Pracownia.Programowania/helpers/random.go

13 lines
145 B
Go
Raw Normal View History

2018-12-11 20:42:44 +01:00
package helpers
import (
"crypto/rand"
"fmt"
)
func GenerateId() string {
b := make([]byte, 8)
rand.Read(b)
return fmt.Sprintf("%x", b)
}