MCPcopy Create free account
hub / github.com/valyala/bytebufferpool / allocNBytes

Function allocNBytes

pool_test.go:88–94  ·  view source on GitHub ↗
(dst []byte, n int)

Source from the content-addressed store, hash-verified

86}
87
88func allocNBytes(dst []byte, n int) []byte {
89 diff := n - cap(dst)
90 if diff <= 0 {
91 return dst[:n]
92 }
93 return append(dst, make([]byte, diff)...)
94}

Callers 1

testGetPutFunction · 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…