aboutsummaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2018-10-01 14:15:29 +0800
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2018-10-01 14:15:29 +0800
commitd4f0cf56d8a7bb271fbd8634d78645bd3c24c9b7 (patch)
tree2bf17d8d3ff14938e770f57d2b95dc19407fca7c /args.go
parentAdd tcp keepalive (diff)
downloadfasthttp-d4f0cf56d8a7bb271fbd8634d78645bd3c24c9b7.tar.gz
fasthttp-d4f0cf56d8a7bb271fbd8634d78645bd3c24c9b7.tar.bz2
fasthttp-d4f0cf56d8a7bb271fbd8634d78645bd3c24c9b7.zip
Remove fasthttp.ByteBuffer
As advertised in https://github.com/valyala/fasthttp/commit/b5f96d4b4120bb1e09c23ac32baf21a14da4a71d
Diffstat (limited to 'args.go')
-rw-r--r--args.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/args.go b/args.go
index 2781593..4d9b35e 100644
--- a/args.go
+++ b/args.go
@@ -5,6 +5,8 @@ import (
"errors"
"io"
"sync"
+
+ "github.com/valyala/bytebufferpool"
)
// AcquireArgs returns an empty Args object from the pool.
@@ -243,10 +245,10 @@ func (a *Args) GetUint(key string) (int, error) {
// SetUint sets uint value for the given key.
func (a *Args) SetUint(key string, value int) {
- bb := AcquireByteBuffer()
+ bb := bytebufferpool.Get()
bb.B = AppendUint(bb.B[:0], value)
a.SetBytesV(key, bb.B)
- ReleaseByteBuffer(bb)
+ bytebufferpool.Put(bb)
}
// SetUintBytes sets uint value for the given key.