From 6e2dbc50f79ec7537c712a3c407b51364322a4d6 Mon Sep 17 00:00:00 2001
From: Fenny <25108519+Fenny@users.noreply.github.com>
Date: Fri, 24 Apr 2020 00:45:02 +0200
Subject: [PATCH 1/3] Update ctx.go
---
ctx.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/ctx.go b/ctx.go
index 143fd88723..98859e9885 100644
--- a/ctx.go
+++ b/ctx.go
@@ -342,6 +342,7 @@ func (ctx *Ctx) Cookie(cookie *Cookie) {
// Cookies is used for getting a cookie value by key
func (ctx *Ctx) Cookies(key ...string) (value string) {
if len(key) == 0 {
+ fmt.Println("Deprecation Warning: c.Cookies() without an key is deprecated since v1.9.2, please use c.Get(\"Cookies\") instead to get the raw cookie header.")
return ctx.Get(HeaderCookie)
}
return getString(ctx.Fasthttp.Request.Header.Cookie(key[0]))
From c62732eac3a9ab999fa6275efaa1d1643f1bfc0e Mon Sep 17 00:00:00 2001
From: Fenny <25108519+Fenny@users.noreply.github.com>
Date: Fri, 24 Apr 2020 01:30:57 +0200
Subject: [PATCH 2/3] v1.9.2
Fix dutch flag
---
.github/README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/README.md b/.github/README.md
index c0d23386cc..c3fe197698 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -24,6 +24,9 @@
+
+
+
From afeb3025d7b4da028fc3c70b8ad0b992d9fc44c6 Mon Sep 17 00:00:00 2001
From: Fenny <25108519+Fenny@users.noreply.github.com>
Date: Fri, 24 Apr 2020 02:15:24 +0200
Subject: [PATCH 3/3] v1.9.2
---
ctx.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ctx.go b/ctx.go
index 98859e9885..361c38bee5 100644
--- a/ctx.go
+++ b/ctx.go
@@ -248,6 +248,7 @@ func (ctx *Ctx) Body(key ...string) string {
}
// Return post value by key
if len(key) > 0 {
+ fmt.Println("DEPRECATED: c.Body(\"" + key[0] + "\") is deprecated, please use c.FormValue(\"" + key[0] + "\") instead.")
return getString(ctx.Fasthttp.Request.PostArgs().Peek(key[0]))
}
return ""
@@ -283,7 +284,7 @@ func (ctx *Ctx) BodyParser(out interface{}) error {
}
return schemaDecoderForm.Decode(out, data.Value)
}
- // query Params
+ // query params
if ctx.Fasthttp.QueryArgs().Len() > 0 {
data := make(map[string][]string)
ctx.Fasthttp.QueryArgs().VisitAll(func(key []byte, val []byte) {
@@ -342,7 +343,7 @@ func (ctx *Ctx) Cookie(cookie *Cookie) {
// Cookies is used for getting a cookie value by key
func (ctx *Ctx) Cookies(key ...string) (value string) {
if len(key) == 0 {
- fmt.Println("Deprecation Warning: c.Cookies() without an key is deprecated since v1.9.2, please use c.Get(\"Cookies\") instead to get the raw cookie header.")
+ fmt.Println("DEPRECATED: c.Cookies() without a key is deprecated, please use c.Get(\"Cookies\") to get the cookie header instead.")
return ctx.Get(HeaderCookie)
}
return getString(ctx.Fasthttp.Request.Header.Cookie(key[0]))