MCPcopy Create free account
hub / github.com/imroc/req / getCopyBuf

Function getCopyBuf

server.go:9–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7var copyBufPool = sync.Pool{New: func() any { return new([copyBufPoolSize]byte) }}
8
9func getCopyBuf() []byte {
10 return copyBufPool.Get().(*[copyBufPoolSize]byte)[:]
11}
12
13func putCopyBuf(b []byte) {
14 if len(b) != copyBufPoolSize {

Callers 1

doBodyCopyMethod · 0.85

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…