Update dependencies

This commit is contained in:
Andrey Nering
2018-03-03 19:28:08 -03:00
parent 12c0d18932
commit 407ec91ca7
45 changed files with 2209 additions and 1279 deletions

View File

@@ -7,7 +7,7 @@ import (
"bytes"
)
const _BUFFER_INIT_GROW_SIZE_MAX = 2048
const bufferMaxInitGrowSize = 2048
// Lazy initialize a buffer.
func allocBuffer(orig, cur string) *bytes.Buffer {
@@ -15,8 +15,8 @@ func allocBuffer(orig, cur string) *bytes.Buffer {
maxSize := len(orig) * 4
// Avoid to reserve too much memory at once.
if maxSize > _BUFFER_INIT_GROW_SIZE_MAX {
maxSize = _BUFFER_INIT_GROW_SIZE_MAX
if maxSize > bufferMaxInitGrowSize {
maxSize = bufferMaxInitGrowSize
}
output.Grow(maxSize)