mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 13:40:38 +03:00
Fix some Go Lint errors
This commit is contained in:
parent
103ea842f8
commit
224a2ddf3c
2 changed files with 10 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue