aboutsummaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
authorGravatar kinggo <lilong.21@bytedance.com> 2022-10-15 21:47:53 +0800
committerGravatar GitHub <noreply@github.com> 2022-10-15 15:47:53 +0200
commit2c8ce3b40e933669366c9519503bc8df4f1a8b8a (patch)
tree67ab218e744daf5dec88e6bcbde01aacf1d80a7b /args.go
parentmake RequestCtx's userdata accept keys that are of type: interface{} (#1387) (diff)
downloadfasthttp-2c8ce3b40e933669366c9519503bc8df4f1a8b8a.tar.gz
fasthttp-2c8ce3b40e933669366c9519503bc8df4f1a8b8a.tar.bz2
fasthttp-2c8ce3b40e933669366c9519503bc8df4f1a8b8a.zip
feat: add header.PeekAll (#1394)
Diffstat (limited to 'args.go')
-rw-r--r--args.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/args.go b/args.go
index 86dc7b9..47a97c6 100644
--- a/args.go
+++ b/args.go
@@ -623,3 +623,13 @@ func decodeArgAppendNoPlus(dst, src []byte) []byte {
}
return dst
}
+
+func peekAllArgBytesToDst(dst [][]byte, h []argsKV, k []byte) [][]byte {
+ for i, n := 0, len(h); i < n; i++ {
+ kv := &h[i]
+ if bytes.Equal(kv.key, k) {
+ dst = append(dst, kv.value)
+ }
+ }
+ return dst
+}