diff options
author | bep <[email protected]> | 2015-03-06 15:58:14 +0100 |
---|---|---|
committer | bep <[email protected]> | 2015-03-06 15:58:14 +0100 |
commit | 224a2ddf3cb0f6b7454313a5f054c8a6c6706c31 (patch) | |
tree | 168fe27c187504d12c27ef9144cefb7629b97ca2 /bufferpool | |
parent | 103ea842f820492b88af370e248613c051c96eac (diff) | |
download | hugo-224a2ddf3cb0f6b7454313a5f054c8a6c6706c31.tar.gz hugo-224a2ddf3cb0f6b7454313a5f054c8a6c6706c31.zip |
Fix some Go Lint errors
Diffstat (limited to 'bufferpool')
-rw-r--r-- | bufferpool/bufpool.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bufferpool/bufpool.go b/bufferpool/bufpool.go index 0b7829b2c..5a550e0e7 100644 --- a/bufferpool/bufpool.go +++ b/bufferpool/bufpool.go @@ -24,10 +24,13 @@ var bufferPool = &sync.Pool{ }, } +// GetBuffer returns a buffer from the pool. func GetBuffer() (buf *bytes.Buffer) { return bufferPool.Get().(*bytes.Buffer) } +// PutBuffer returns a buffer to the pool. +// The buffer is reset before it is put back into circulation. func PutBuffer(buf *bytes.Buffer) { buf.Reset() bufferPool.Put(buf) |