Discover Packages
github.com/cyfdecyf/leakybuf
package
module
Version:
v0.0.0-...-ffae040
Opens a new window with list of versions in this module.
Published: Jun 18, 2014
License: BSD-2-Clause
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 67
Opens a new window with list of known importers.
README
README
¶
leakybuf
Leaky buffer based on examples in Effective Go.
Expand ▾
Collapse ▴
Documentation
¶
Package leakybuf provides leaky buffer.
It's based on the example in Effective Go.
NewLeakyBuf creates a leaky buffer which can hold at most n buffer, each
with bufSize bytes.
Get returns a buffer from the leaky buffer or create a new buffer.
Put add the buffer into the free buffer pool for reuse. Panic if the buffer
size is not the same with the leaky buffer's. This is intended to expose
error usage of leaky buffer.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.