kubo/test/cli/testutils/random.go
2022-12-16 07:39:52 -05:00

13 lines
177 B
Go

package testutils
import "crypto/rand"
func RandomBytes(n int) []byte {
bytes := make([]byte, n)
_, err := rand.Read(bytes)
if err != nil {
panic(err)
}
return bytes
}