diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2018-10-01 14:15:29 +0800 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2018-10-01 14:15:29 +0800 |
commit | d4f0cf56d8a7bb271fbd8634d78645bd3c24c9b7 (patch) | |
tree | 2bf17d8d3ff14938e770f57d2b95dc19407fca7c /args.go | |
parent | Add tcp keepalive (diff) | |
download | fasthttp-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.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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. |