mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-03 17:47:44 +00:00
Update dependencies and remove old matterclient lib (#2067)
This commit is contained in:
15
vendor/go.mau.fi/whatsmeow/util/randbytes/randbytes.go
vendored
Normal file
15
vendor/go.mau.fi/whatsmeow/util/randbytes/randbytes.go
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
package randbytes
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func Make(length int) []byte {
|
||||
random := make([]byte, length)
|
||||
_, err := rand.Read(random)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to get random bytes: %w", err))
|
||||
}
|
||||
return random
|
||||
}
|
Reference in New Issue
Block a user