mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-24 19:32:20 +00:00
Remove error check for token generator
This commit is contained in:
parent
4ad7285103
commit
213abebf0a
@ -8,10 +8,7 @@ import (
|
|||||||
// newToken returns new generated token with specified length
|
// newToken returns new generated token with specified length
|
||||||
func newToken(size int) string {
|
func newToken(size int) string {
|
||||||
b := make([]byte, size)
|
b := make([]byte, size)
|
||||||
_, err := rand.Read(b)
|
rand.Read(b) // TODO: check may be can be error
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return fmt.Sprintf("%x", b)
|
return fmt.Sprintf("%x", b)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user