MCPcopy
hub / github.com/tinylib/msgp / RandBytes

Function RandBytes

msgp/write_test.go:21–28  ·  view source on GitHub ↗
(sz int)

Source from the content-addressed store, hash-verified

19)
20
21func RandBytes(sz int) []byte {
22 out := make([]byte, sz)
23 rng := rand.New(rand.NewSource(time.Now().UnixNano()))
24 for i := range out {
25 out[i] = byte(rng.Uint32())
26 }
27 return out
28}
29
30func TestWriteMapHeader(t *testing.T) {
31 tests := []struct {

Callers 14

TestReadBytesFunction · 0.85
benchBytesFunction · 0.85
TestReadStringFunction · 0.85
benchStringFunction · 0.85
benchStringAsBytesFunction · 0.85
TestWriteBytesFunction · 0.85
benchwrBytesFunction · 0.85
TestAppendBytesFunction · 0.85
benchappendBytesFunction · 0.85
TestAppendStringFunction · 0.85
benchappendStringFunction · 0.85
randomExtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…