1
0
Fork 0

Remove github.com/satori/go.uuid.

This commit is contained in:
Ludovic Fernandez 2019-04-05 12:44:03 +02:00 committed by Traefiker Bot
parent e1d097ea20
commit 2e19e45aa4
25 changed files with 1027 additions and 365 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)