forked from forgejo/forgejo
Bump unrolled/render to v1.1.0 (#15581)
v1.1.0 has improved buffer pooling
This commit is contained in:
parent
f719ffc783
commit
445e47b692
10 changed files with 97 additions and 32 deletions
8
vendor/github.com/unrolled/render/buffer.go
generated
vendored
8
vendor/github.com/unrolled/render/buffer.go
generated
vendored
|
@ -2,9 +2,6 @@ package render
|
|||
|
||||
import "bytes"
|
||||
|
||||
// bufPool represents a reusable buffer pool for executing templates into.
|
||||
var bufPool *BufferPool
|
||||
|
||||
// BufferPool implements a pool of bytes.Buffers in the form of a bounded channel.
|
||||
// Pulled from the github.com/oxtoacart/bpool package (Apache licensed).
|
||||
type BufferPool struct {
|
||||
|
@ -39,8 +36,3 @@ func (bp *BufferPool) Put(b *bytes.Buffer) {
|
|||
default: // Discard the buffer if the pool is full.
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize buffer pool for writing templates into.
|
||||
func init() {
|
||||
bufPool = NewBufferPool(64)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue