aboutsummaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-12-19 20:38:10 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-12-19 20:38:10 +0200
commit5ff6be8feeceaeb4250153cf29b79ec657eb9c7a (patch)
tree6567f53965849f5e68fbf038a5bf6aff17adc652 /args.go
parentClarify Append* return values (diff)
downloadfasthttp-5ff6be8feeceaeb4250153cf29b79ec657eb9c7a.tar.gz
fasthttp-5ff6be8feeceaeb4250153cf29b79ec657eb9c7a.tar.bz2
fasthttp-5ff6be8feeceaeb4250153cf29b79ec657eb9c7a.zip
Substitute AppendBytesStr by append()
Diffstat (limited to 'args.go')
-rw-r--r--args.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/args.go b/args.go
index 9da40f3..079f954 100644
--- a/args.go
+++ b/args.go
@@ -50,7 +50,7 @@ func (a *Args) Len() int {
// Parse parses the given string containing query args.
func (a *Args) Parse(s string) {
- a.buf = AppendBytesStr(a.buf[:0], s)
+ a.buf = append(a.buf[:0], s...)
a.ParseBytes(a.buf)
}
@@ -110,7 +110,7 @@ func (a *Args) WriteTo(w io.Writer) (int64, error) {
// Del deletes argument with the given key from query args.
func (a *Args) Del(key string) {
- a.bufKV.key = AppendBytesStr(a.bufKV.key[:0], key)
+ a.bufKV.key = append(a.bufKV.key[:0], key...)
a.DelBytes(a.bufKV.key)
}
@@ -121,19 +121,19 @@ func (a *Args) DelBytes(key []byte) {
// Set sets 'key=value' argument.
func (a *Args) Set(key, value string) {
- a.bufKV.value = AppendBytesStr(a.bufKV.value[:0], value)
+ a.bufKV.value = append(a.bufKV.value[:0], value...)
a.SetBytesV(key, a.bufKV.value)
}
// SetBytesK sets 'key=value' argument.
func (a *Args) SetBytesK(key []byte, value string) {
- a.bufKV.value = AppendBytesStr(a.bufKV.value[:0], value)
+ a.bufKV.value = append(a.bufKV.value[:0], value...)
a.SetBytesKV(key, a.bufKV.value)
}
// SetBytesV sets 'key=value' argument.
func (a *Args) SetBytesV(key string, value []byte) {
- a.bufKV.key = AppendBytesStr(a.bufKV.key[:0], key)
+ a.bufKV.key = append(a.bufKV.key[:0], key...)
a.SetBytesKV(a.bufKV.key, value)
}
@@ -158,7 +158,7 @@ func (a *Args) PeekBytes(key []byte) []byte {
// Has returns true if the given key exists in Args.
func (a *Args) Has(key string) bool {
- a.bufKV.key = AppendBytesStr(a.bufKV.key[:0], key)
+ a.bufKV.key = append(a.bufKV.key[:0], key...)
return a.HasBytes(a.bufKV.key)
}
@@ -181,7 +181,7 @@ func (a *Args) GetUint(key string) (int, error) {
// SetUint sets uint value for the given key.
func (a *Args) SetUint(key string, value int) {
- a.bufKV.key = AppendBytesStr(a.bufKV.key[:0], key)
+ a.bufKV.key = append(a.bufKV.key[:0], key...)
a.SetUintBytes(a.bufKV.key, value)
}