MCPcopy Index your code
hub / github.com/unrolled/render / SizedBufferPool

Struct SizedBufferPool

sizedbufferpool.go:12–15  ·  view source on GitHub ↗

Pulled from the github.com/oxtoacart/bpool package (Apache licensed). SizedBufferPool implements a pool of bytes.Buffers in the form of a bounded channel. Buffers are pre-allocated to the requested size.

Source from the content-addressed store, hash-verified

10// SizedBufferPool implements a pool of bytes.Buffers in the form of a bounded
11// channel. Buffers are pre-allocated to the requested size.
12type SizedBufferPool struct {
13 c chan *bytes.Buffer
14 a int
15}
16
17// NewSizedBufferPool creates a new BufferPool bounded to the given size.
18// size defines the number of buffers to be retained in the pool and alloc sets

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected