Remove error check for token generator

This commit is contained in:
nxshock 2019-07-22 22:28:55 +05:00
parent 4ad7285103
commit 213abebf0a

View File

@ -8,10 +8,7 @@ import (
// newToken returns new generated token with specified length
func newToken(size int) string {
b := make([]byte, size)
_, err := rand.Read(b)
if err != nil {
panic(err)
}
rand.Read(b) // TODO: check may be can be error
return fmt.Sprintf("%x", b)
}