diff --git a/.github/README.md b/.github/README.md
index 9fa760d5..6e3b39dd 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -1,556 +1,556 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.
-
-
-## ⚡️ Quickstart
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Installation
-
-First of all, [download](https://golang.org/dl/) and install Go. `1.11` or higher is required.
-
-Installation is done using the [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) command:
-
-```bash
-go get -u github.com/gofiber/fiber
-```
-
-## 🤖 Benchmarks
-
-These tests are performed by [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) and [Go Web](https://github.com/smallnest/go-web-framework-benchmark). If you want to see all results, please visit our [Wiki](https://docs.gofiber.io/benchmarks).
-
-
-
-
-
-
-## 🎯 Features
-
-- Robust [routing](https://docs.gofiber.io/routing)
-- Serve [static files](https://docs.gofiber.io/application#static)
-- Extreme [performance](https://docs.gofiber.io/benchmarks)
-- [Low memory](https://docs.gofiber.io/benchmarks) footprint
-- [API endpoints](https://docs.gofiber.io/context)
-- [Middleware](https://docs.gofiber.io/middleware) & [Next](https://docs.gofiber.io/context#next) support
-- [Rapid](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) server-side programming
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Translated in [12 other languages](https://docs.gofiber.io/)
-- And much more, [explore Fiber](https://docs.gofiber.io/)
-
-## 💡 Philosophy
-
-New gophers that make the switch from [Node.js](https://nodejs.org/en/about/) to [Go](https://golang.org/doc/) are dealing with a learning curve before they can start building their web applications or microservices. Fiber, as a **web framework**, was created with the idea of **minimalism** and follows the **UNIX way**, so that new gophers can quickly enter the world of Go with a warm and trusted welcome.
-
-Fiber is **inspired** by Express, the most popular web framework on the Internet. We combined the **ease** of Express and **raw performance** of Go. If you have ever implemented a web application in Node.js (_using Express or similar_), then many methods and principles will seem **very common** to you.
-
-We **listen** to our users in [issues](https://github.com/gofiber/fiber/issues), Discord [channel](https://gofiber.io/discord) _and all over the Internet_ to create a **fast**, **flexible** and **friendly** Go web framework for **any** task, **deadline** and developer **skill**! Just like Express does in the JavaScript world.
-
-## 👀 Examples
-
-Listed below are some of the common examples.
-
-> If you want to see more code examples, please visit our [Recipes repository](https://github.com/gofiber/recipes) or visit our [API documentation](https://docs.gofiber.io).
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Media
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Contribute
-
-If you want to say **thank you** and/or support the active development of `Fiber`:
-
-1. Add a [GitHub Star](https://github.com/gofiber/fiber/stargazers) to the project.
-2. Tweet about the project [on your Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Write a review or tutorial on [Medium](https://medium.com/), [Dev.to](https://dev.to/) or personal blog.
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.
+
+
+## ⚡️ Quickstart
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Installation
+
+First of all, [download](https://golang.org/dl/) and install Go. `1.11` or higher is required.
+
+Installation is done using the [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) command:
+
+```bash
+go get -u github.com/gofiber/fiber
+```
+
+## 🤖 Benchmarks
+
+These tests are performed by [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) and [Go Web](https://github.com/smallnest/go-web-framework-benchmark). If you want to see all results, please visit our [Wiki](https://docs.gofiber.io/benchmarks).
+
+
+
+
+
+
+## 🎯 Features
+
+- Robust [routing](https://docs.gofiber.io/routing)
+- Serve [static files](https://docs.gofiber.io/application#static)
+- Extreme [performance](https://docs.gofiber.io/benchmarks)
+- [Low memory](https://docs.gofiber.io/benchmarks) footprint
+- [API endpoints](https://docs.gofiber.io/context)
+- [Middleware](https://docs.gofiber.io/middleware) & [Next](https://docs.gofiber.io/context#next) support
+- [Rapid](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) server-side programming
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Translated in [12 other languages](https://docs.gofiber.io/)
+- And much more, [explore Fiber](https://docs.gofiber.io/)
+
+## 💡 Philosophy
+
+New gophers that make the switch from [Node.js](https://nodejs.org/en/about/) to [Go](https://golang.org/doc/) are dealing with a learning curve before they can start building their web applications or microservices. Fiber, as a **web framework**, was created with the idea of **minimalism** and follows the **UNIX way**, so that new gophers can quickly enter the world of Go with a warm and trusted welcome.
+
+Fiber is **inspired** by Express, the most popular web framework on the Internet. We combined the **ease** of Express and **raw performance** of Go. If you have ever implemented a web application in Node.js (_using Express or similar_), then many methods and principles will seem **very common** to you.
+
+We **listen** to our users in [issues](https://github.com/gofiber/fiber/issues), Discord [channel](https://gofiber.io/discord) _and all over the Internet_ to create a **fast**, **flexible** and **friendly** Go web framework for **any** task, **deadline** and developer **skill**! Just like Express does in the JavaScript world.
+
+## 👀 Examples
+
+Listed below are some of the common examples.
+
+> If you want to see more code examples, please visit our [Recipes repository](https://github.com/gofiber/recipes) or visit our [API documentation](https://docs.gofiber.io).
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Media
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Contribute
+
+If you want to say **thank you** and/or support the active development of `Fiber`:
+
+1. Add a [GitHub Star](https://github.com/gofiber/fiber/stargazers) to the project.
+2. Tweet about the project [on your Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Write a review or tutorial on [Medium](https://medium.com/), [Dev.to](https://dev.to/) or personal blog.
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_de.md b/.github/README_de.md
index 055f4930..f47f01e1 100644
--- a/.github/README_de.md
+++ b/.github/README_de.md
@@ -1,552 +1,552 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fiber ist ein von Expressjs inspiriertes Web-Framework, aufgebaut auf Fasthttp - die schnellste HTTP engine für Go. Kreiert um Dinge zu vereinfachen, für schnelle Entwicklung mit keinen Speicherzuweisungen und Performance im Hinterkopf.
-
-
-## ⚡️ Schnellstart
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Installation
-
-Als erstes, [downloade](https://golang.org/dl/) und installiere Go. `1.11` oder höher.
-
-Die Installation wird durch das [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) Kommando gestartet:
-
-```bash
-go get -u github.com/gofiber/fiber
-```
-
-## 🤖 Benchmarks
-
-Diese Tests wurden von [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) und [Go Web](https://github.com/smallnest/go-web-framework-benchmark) ausgeführt. Falls du alle Resultate sehen möchtest, besuche bitte unser [Wiki](https://docs.gofiber.io/benchmarks).
-
-
-
-
-
-
-## 🎯 Eigenschaften
-
-- Robustes [Routing](https://docs.gofiber.io/routing)
-- Bereitstellen von [statischen Dateien](https://docs.gofiber.io/application#static)
-- Extreme [Performance](https://docs.gofiber.io/benchmarks)
-- [Geringe Arbeitsspeicher](https://docs.gofiber.io/benchmarks) verwendung
-- Express [API Endpunkte](https://docs.gofiber.io/context)
-- [Middleware](https://docs.gofiber.io/middleware) & [Next](https://docs.gofiber.io/context#next) Support
-- [Schnelle](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) serverseitige Programmierung
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- Und vieles mehr - [erkunde Fiber](https://docs.gofiber.io/)
-
-## 💡 Philosophie
-
-Neue gopher welche von [Node.js](https://nodejs.org/en/about/) zu [Go](https://golang.org/doc/) umsteigen, müssen eine Lernkurve durchlaufen, bevor sie ihre Webanwendungen oder Microservices erstellen können. Fiber, als ein **Web-Framework**, wurde erschaffen mit der Idee von **Minimalismus** und folgt dem **UNIX Weg** damit neue Gophers mit einem herzlichen und vertrauenswürdigen Willkommen schnell in die Welt von Go eintreten können.
-
-Fiber ist **inspiriert** von Expressjs, dem beliebtesten Web-Framework im Internet. Wir haben die **Leichtigkeit** von Express und die **Rohleistung** von Go kombiniert. Wenn du jemals eine Webanwendung mit Node.js implementiert hast (_mit Express.js oder ähnlichem_), werden dir viele Methoden und Prinzipien **sehr vertraut** vorkommen.
-
-## 👀 Beispiele
-
-Nachfolgend sind einige der gängigen Beispiele aufgeführt. Wenn du weitere Codebeispiele sehen möchten, besuche bitte unser ["Recipes Repository"](https://github.com/gofiber/recipes) oder besuche unsere [API Dokumentation](https://docs.gofiber.io).
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Medien
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Mitwirken
-
-Falls du **danke** sagen möchtest und/oder aktiv die Entwicklung von `fiber` fördern möchtest:
-
-1. Füge dem Projekt einen [GitHub Stern](https://github.com/gofiber/fiber/stargazers) hinzu.
-2. Twittere über das Projekt [auf deinem Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Schreibe eine Rezension auf [Medium](https://medium.com/), [Dev.to](https://dev.to/) oder einem persönlichem Blog.
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party MIT licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Fiber ist ein von Expressjs inspiriertes Web-Framework, aufgebaut auf Fasthttp - die schnellste HTTP engine für Go. Kreiert um Dinge zu vereinfachen, für schnelle Entwicklung mit keinen Speicherzuweisungen und Performance im Hinterkopf.
+
+
+## ⚡️ Schnellstart
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Installation
+
+Als erstes, [downloade](https://golang.org/dl/) und installiere Go. `1.11` oder höher.
+
+Die Installation wird durch das [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) Kommando gestartet:
+
+```bash
+go get -u github.com/gofiber/fiber
+```
+
+## 🤖 Benchmarks
+
+Diese Tests wurden von [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) und [Go Web](https://github.com/smallnest/go-web-framework-benchmark) ausgeführt. Falls du alle Resultate sehen möchtest, besuche bitte unser [Wiki](https://docs.gofiber.io/benchmarks).
+
+
+
+
+
+
+## 🎯 Eigenschaften
+
+- Robustes [Routing](https://docs.gofiber.io/routing)
+- Bereitstellen von [statischen Dateien](https://docs.gofiber.io/application#static)
+- Extreme [Performance](https://docs.gofiber.io/benchmarks)
+- [Geringe Arbeitsspeicher](https://docs.gofiber.io/benchmarks) verwendung
+- Express [API Endpunkte](https://docs.gofiber.io/context)
+- [Middleware](https://docs.gofiber.io/middleware) & [Next](https://docs.gofiber.io/context#next) Support
+- [Schnelle](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) serverseitige Programmierung
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- Und vieles mehr - [erkunde Fiber](https://docs.gofiber.io/)
+
+## 💡 Philosophie
+
+Neue gopher welche von [Node.js](https://nodejs.org/en/about/) zu [Go](https://golang.org/doc/) umsteigen, müssen eine Lernkurve durchlaufen, bevor sie ihre Webanwendungen oder Microservices erstellen können. Fiber, als ein **Web-Framework**, wurde erschaffen mit der Idee von **Minimalismus** und folgt dem **UNIX Weg** damit neue Gophers mit einem herzlichen und vertrauenswürdigen Willkommen schnell in die Welt von Go eintreten können.
+
+Fiber ist **inspiriert** von Expressjs, dem beliebtesten Web-Framework im Internet. Wir haben die **Leichtigkeit** von Express und die **Rohleistung** von Go kombiniert. Wenn du jemals eine Webanwendung mit Node.js implementiert hast (_mit Express.js oder ähnlichem_), werden dir viele Methoden und Prinzipien **sehr vertraut** vorkommen.
+
+## 👀 Beispiele
+
+Nachfolgend sind einige der gängigen Beispiele aufgeführt. Wenn du weitere Codebeispiele sehen möchten, besuche bitte unser ["Recipes Repository"](https://github.com/gofiber/recipes) oder besuche unsere [API Dokumentation](https://docs.gofiber.io).
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Medien
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Mitwirken
+
+Falls du **danke** sagen möchtest und/oder aktiv die Entwicklung von `fiber` fördern möchtest:
+
+1. Füge dem Projekt einen [GitHub Stern](https://github.com/gofiber/fiber/stargazers) hinzu.
+2. Twittere über das Projekt [auf deinem Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Schreibe eine Rezension auf [Medium](https://medium.com/), [Dev.to](https://dev.to/) oder einem persönlichem Blog.
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party MIT licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
\ No newline at end of file
diff --git a/.github/README_es.md b/.github/README_es.md
index 76a34908..ab456b0d 100644
--- a/.github/README_es.md
+++ b/.github/README_es.md
@@ -1,552 +1,552 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fiber es un framework web inspirado en Express construido sobre Fasthttp, el motor HTTP más rápido para Go. Diseñado para facilitar las cosas para un desarrollo rápido con cero asignación de memoria y rendimiento en mente.
-
-
-## ⚡️ Inicio rápido
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Instalación
-
-En primer lugar, [descargue](https://golang.org/dl/) e instale Go. Se requiere `1.11` o superior.
-
-La instalación se realiza con el comando [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) :
-
-```bash
-go get github.com/gofiber/fiber/...
-```
-
-## 🤖 Puntos de referencia
-
-Estas pruebas son realizadas por [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) y [Go Web](https://github.com/smallnest/go-web-framework-benchmark) . Si desea ver todos los resultados, visite nuestro [Wiki](https://docs.gofiber.io/benchmarks) .
-
-
-
-
-
-
-## 🎯 Características
-
-- [Enrutamiento](https://docs.gofiber.io/routing) robusto
-- Servir [archivos estáticos](https://docs.gofiber.io/application#static)
-- [Rendimiento](https://docs.gofiber.io/benchmarks) extremo
-- [Poca](https://docs.gofiber.io/benchmarks) huella de [memoria](https://docs.gofiber.io/benchmarks)
-- [Puntos finales de API](https://docs.gofiber.io/context) Express
-- Middleware y [próximo](https://docs.gofiber.io/context#next) soporte
-- Programación [rápida](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) del lado del servidor
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Disponible en [12 idiomas](https://docs.gofiber.io/)
-- Y mucho más, [explora Fiber](https://docs.gofiber.io/)
-
-## 💡 Filosofía
-
-Los nuevos gophers que hacen el cambio de [Node.js](https://nodejs.org/en/about/) a [Go](https://golang.org/doc/) están lidiando con una curva de aprendizaje antes de que puedan comenzar a construir sus aplicaciones web o microservicios. Fiber, como un **marco web** , fue creado con la idea del **minimalismo** y sigue el **camino de UNIX** , para que los nuevos gophers puedan ingresar rápidamente al mundo de Go con una cálida y confiable bienvenida.
-
-Fiber está **inspirado** en Expressjs, el framework web más popular en Internet. Combinamos la **facilidad** de Express y **el rendimiento bruto** de Go. Si alguna vez ha implementado una aplicación web en Node.js ( *utilizando Express.js o similar* ), muchos métodos y principios le parecerán **muy comunes** .
-
-## 👀 Ejemplos
-
-A continuación se enumeran algunos de los ejemplos comunes. Si desea ver más ejemplos de código, visite nuestro [repositorio de Recetas](https://github.com/gofiber/recipes) o nuestra [documentación de API](https://docs.gofiber.io) .
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Mostrar más ejemplos de código
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber soporta el [Go template engine](https://golang.org/pkg/html/template/) por default.
-
-Pero si deseas usar otro template engine como [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) o [pug](https://github.com/Joker/jade).
-
-Puedes usar nuestro [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Agrupando rutas en cadenas
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Respuesta 404 personalizada
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### Respuesta JSON
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Medios
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Contribuir
-
-Si quiere **agradecer** y/o apoyar el desarrollo activo de `Fiber`:
-
-1. Agrega una [estrella de GitHub](https://github.com/gofiber/fiber/stargazers) al proyecto.
-2. Tuitea sobre el proyecto [en tu Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Escribe una reseña o tutorial en [Medium](https://medium.com/) , [Dev.to](https://dev.to/) o blog personal.
-4. Ayúdanos a traducir la documentación de nuestra API a través de [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Apoya el proyecto donando una [tasa de café](https://buymeacoff.ee/fenny).
-
-## ☕ Personas que han mostrado su apoyo
-
-Fiber es un proyecto open source que se mantiene a través de donaciones para pagar las cuentas e.g. nuestro nombre de dominio, gitbook, netlify y hosting serverless. Si quieres apoyar a Fiber, puedes ☕ [**comprar un café**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Contribuyentes de código
-
-
-
-## ⚠️ Licencia
-
-Copyright (c) 2019-presente [Fenny](https://github.com/fenny) y [contribuyentes](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` es software libre y de código abierto bajo la licencia [MIT](https://github.com/gofiber/fiber/blob/master/LICENSE). El logo oficial fué creado por [Vic Shóstak](https://github.com/koddr) y distribuido bajo la licencia [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Fiber es un framework web inspirado en Express construido sobre Fasthttp, el motor HTTP más rápido para Go. Diseñado para facilitar las cosas para un desarrollo rápido con cero asignación de memoria y rendimiento en mente.
+
+
+## ⚡️ Inicio rápido
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Instalación
+
+En primer lugar, [descargue](https://golang.org/dl/) e instale Go. Se requiere `1.11` o superior.
+
+La instalación se realiza con el comando [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) :
+
+```bash
+go get github.com/gofiber/fiber/...
+```
+
+## 🤖 Puntos de referencia
+
+Estas pruebas son realizadas por [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) y [Go Web](https://github.com/smallnest/go-web-framework-benchmark) . Si desea ver todos los resultados, visite nuestro [Wiki](https://docs.gofiber.io/benchmarks) .
+
+
+
+
+
+
+## 🎯 Características
+
+- [Enrutamiento](https://docs.gofiber.io/routing) robusto
+- Servir [archivos estáticos](https://docs.gofiber.io/application#static)
+- [Rendimiento](https://docs.gofiber.io/benchmarks) extremo
+- [Poca](https://docs.gofiber.io/benchmarks) huella de [memoria](https://docs.gofiber.io/benchmarks)
+- [Puntos finales de API](https://docs.gofiber.io/context) Express
+- Middleware y [próximo](https://docs.gofiber.io/context#next) soporte
+- Programación [rápida](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) del lado del servidor
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Disponible en [12 idiomas](https://docs.gofiber.io/)
+- Y mucho más, [explora Fiber](https://docs.gofiber.io/)
+
+## 💡 Filosofía
+
+Los nuevos gophers que hacen el cambio de [Node.js](https://nodejs.org/en/about/) a [Go](https://golang.org/doc/) están lidiando con una curva de aprendizaje antes de que puedan comenzar a construir sus aplicaciones web o microservicios. Fiber, como un **marco web** , fue creado con la idea del **minimalismo** y sigue el **camino de UNIX** , para que los nuevos gophers puedan ingresar rápidamente al mundo de Go con una cálida y confiable bienvenida.
+
+Fiber está **inspirado** en Expressjs, el framework web más popular en Internet. Combinamos la **facilidad** de Express y **el rendimiento bruto** de Go. Si alguna vez ha implementado una aplicación web en Node.js ( *utilizando Express.js o similar* ), muchos métodos y principios le parecerán **muy comunes** .
+
+## 👀 Ejemplos
+
+A continuación se enumeran algunos de los ejemplos comunes. Si desea ver más ejemplos de código, visite nuestro [repositorio de Recetas](https://github.com/gofiber/recipes) o nuestra [documentación de API](https://docs.gofiber.io) .
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Mostrar más ejemplos de código
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber soporta el [Go template engine](https://golang.org/pkg/html/template/) por default.
+
+Pero si deseas usar otro template engine como [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) o [pug](https://github.com/Joker/jade).
+
+Puedes usar nuestro [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Agrupando rutas en cadenas
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Respuesta 404 personalizada
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Respuesta JSON
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Medios
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Contribuir
+
+Si quiere **agradecer** y/o apoyar el desarrollo activo de `Fiber`:
+
+1. Agrega una [estrella de GitHub](https://github.com/gofiber/fiber/stargazers) al proyecto.
+2. Tuitea sobre el proyecto [en tu Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Escribe una reseña o tutorial en [Medium](https://medium.com/) , [Dev.to](https://dev.to/) o blog personal.
+4. Ayúdanos a traducir la documentación de nuestra API a través de [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Apoya el proyecto donando una [tasa de café](https://buymeacoff.ee/fenny).
+
+## ☕ Personas que han mostrado su apoyo
+
+Fiber es un proyecto open source que se mantiene a través de donaciones para pagar las cuentas e.g. nuestro nombre de dominio, gitbook, netlify y hosting serverless. Si quieres apoyar a Fiber, puedes ☕ [**comprar un café**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Contribuyentes de código
+
+
+
+## ⚠️ Licencia
+
+Copyright (c) 2019-presente [Fenny](https://github.com/fenny) y [contribuyentes](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` es software libre y de código abierto bajo la licencia [MIT](https://github.com/gofiber/fiber/blob/master/LICENSE). El logo oficial fué creado por [Vic Shóstak](https://github.com/koddr) y distribuido bajo la licencia [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_fr.md b/.github/README_fr.md
index a202ecba..20905b91 100644
--- a/.github/README_fr.md
+++ b/.github/README_fr.md
@@ -1,552 +1,552 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber est un framework web inspiré d' Express. Il se base sur Fasthttp, l'implémentation HTTP de Go la plus rapide. Conçu pour faciliter les choses pour des développements rapides, Fiber garde à l'esprit l'absence d'allocations mémoires, ainsi que les performances.
-
-
-## ⚡️ Quickstart
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Installation
-
-Premièrement, [téléchargez](https://golang.org/dl/) et installez Go. Version `1.11` ou supérieur requise.
-
-L'installation est ensuite lancée via la commande [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
-
-```bash
-go get -u github.com/gofiber/fiber/...
-```
-
-## 🤖 Benchmarks
-
-Ces tests sont effectués par [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) et [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Si vous voulez voir tous les résultats, n'hésitez pas à consulter notre [Wiki](https://docs.gofiber.io/benchmarks).
-
-
-
-
-
-
-## 🎯 Features
-
-- [Routing](https://docs.gofiber.io/routing) robuste
-- Serve [static files](https://docs.gofiber.io/application#static)
-- [Performances](https://docs.gofiber.io/benchmarks) extrêmes
-- [Faible empreinte mémoire](https://docs.gofiber.io/benchmarks)
-- [API endpoints](https://docs.gofiber.io/context)
-- Middleware & [Next](https://docs.gofiber.io/context#next) support
-- Programmation côté serveur [rapide](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- Et plus encore, [explorez Fiber](https://docs.gofiber.io/)
-
-## 💡 Philosophie
-
-Les nouveaux gophers qui passent de [Node.js](https://nodejs.org/en/about/) à [Go](https://golang.org/doc/) sont confrontés à une courbe d'apprentissage, avant de pouvoir construire leurs applications web et microservices. Fiber, en tant que **framework web**, a été mis au point avec en tête l'idée de **minimalisme**, tout en suivant l'**UNIX way**, afin que les nouveaux gophers puissent rapidement entrer dans le monde de Go, avec un accueil chaleureux, de confiance.
-
-Fiber est **inspiré** par Express, le framework web le plus populaire d'Internet. Nous avons combiné la **facilité** d'Express, et la **performance brute** de Go. Si vous avez déja développé une application web en Node.js (_en utilisant Express ou équivalent_), alors de nombreuses méthodes et principes vous sembleront **familiers**.
-
-## 👀 Exemples
-
-Ci-dessous quelques exemples courants. Si vous voulez voir plus d'exemples, rendez-vous sur notre ["Recipes repository"](https://github.com/gofiber/recipes) ou visitez notre [documentation API](https://docs.gofiber.io).
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Media
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Contribuer
-
-Si vous voulez nous remercier et/ou soutenir le développement actif de `Fiber`:
-
-1. Ajoutez une [GitHub Star](https://github.com/gofiber/fiber/stargazers) à ce projet.
-2. Twittez à propos de ce projet [sur votre Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Ecrivez un article (review, tutorial) sur [Medium](https://medium.com/), [Dev.to](https://dev.to/), ou encore un blog personnel.
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber est un framework web inspiré d' Express. Il se base sur Fasthttp, l'implémentation HTTP de Go la plus rapide. Conçu pour faciliter les choses pour des développements rapides, Fiber garde à l'esprit l'absence d'allocations mémoires, ainsi que les performances.
+
+
+## ⚡️ Quickstart
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Installation
+
+Premièrement, [téléchargez](https://golang.org/dl/) et installez Go. Version `1.11` ou supérieur requise.
+
+L'installation est ensuite lancée via la commande [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
+
+```bash
+go get -u github.com/gofiber/fiber/...
+```
+
+## 🤖 Benchmarks
+
+Ces tests sont effectués par [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) et [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Si vous voulez voir tous les résultats, n'hésitez pas à consulter notre [Wiki](https://docs.gofiber.io/benchmarks).
+
+
+
+
+
+
+## 🎯 Features
+
+- [Routing](https://docs.gofiber.io/routing) robuste
+- Serve [static files](https://docs.gofiber.io/application#static)
+- [Performances](https://docs.gofiber.io/benchmarks) extrêmes
+- [Faible empreinte mémoire](https://docs.gofiber.io/benchmarks)
+- [API endpoints](https://docs.gofiber.io/context)
+- Middleware & [Next](https://docs.gofiber.io/context#next) support
+- Programmation côté serveur [rapide](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- Et plus encore, [explorez Fiber](https://docs.gofiber.io/)
+
+## 💡 Philosophie
+
+Les nouveaux gophers qui passent de [Node.js](https://nodejs.org/en/about/) à [Go](https://golang.org/doc/) sont confrontés à une courbe d'apprentissage, avant de pouvoir construire leurs applications web et microservices. Fiber, en tant que **framework web**, a été mis au point avec en tête l'idée de **minimalisme**, tout en suivant l'**UNIX way**, afin que les nouveaux gophers puissent rapidement entrer dans le monde de Go, avec un accueil chaleureux, de confiance.
+
+Fiber est **inspiré** par Express, le framework web le plus populaire d'Internet. Nous avons combiné la **facilité** d'Express, et la **performance brute** de Go. Si vous avez déja développé une application web en Node.js (_en utilisant Express ou équivalent_), alors de nombreuses méthodes et principes vous sembleront **familiers**.
+
+## 👀 Exemples
+
+Ci-dessous quelques exemples courants. Si vous voulez voir plus d'exemples, rendez-vous sur notre ["Recipes repository"](https://github.com/gofiber/recipes) ou visitez notre [documentation API](https://docs.gofiber.io).
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Media
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Contribuer
+
+Si vous voulez nous remercier et/ou soutenir le développement actif de `Fiber`:
+
+1. Ajoutez une [GitHub Star](https://github.com/gofiber/fiber/stargazers) à ce projet.
+2. Twittez à propos de ce projet [sur votre Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Ecrivez un article (review, tutorial) sur [Medium](https://medium.com/), [Dev.to](https://dev.to/), ou encore un blog personnel.
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_he.md b/.github/README_he.md
index 9e84b3a3..aa670025 100644
--- a/.github/README_he.md
+++ b/.github/README_he.md
@@ -1,712 +1,712 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Fiber היא
web framework בהשראת
Express הבנויה על גבי
Fasthttp, מנוע ה-HTTP
המהיר ביותר עבור
Go.
- נועדה
להקל על העניינים למען פיתוח
מהיר,
ללא הקצאות זכרון ולוקחת
ביצועים בחשבון.
-
-
-
-
-
-## ⚡️ התחלה מהירה
-
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
-
-## ⚙️ התקנה
-
-
-
-
-קודם כל, [הורידו](https://golang.org/dl/) והתקינו את Go. נדרשת גרסה `1.11` ומעלה.
-
-
-
-
-ההתקנה מתבצעת באמצעות הפקודה [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
-
-
-```bash
-go get -u github.com/gofiber/fiber
-```
-
-
-
-## 🤖 מדדים
-
-
-
-
-הבדיקות מבוצעות על ידי [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) ו-[Go Web](https://github.com/smallnest/go-web-framework-benchmark). אם אתם רוצים לראות את כל התוצאות, אנא בקרו ב-[Wiki](https://docs.gofiber.io/benchmarks) שלנו.
-
-
-
-
-
-
-
-
-
-## 🎯 יכולות
-
-
-
-
-- [ניתוב](https://docs.gofiber.io/routing) רובסטי
-- הנגשת [קבצים סטטיים](https://docs.gofiber.io/application#static)
-- [ביצועים](https://docs.gofiber.io/benchmarks) גבוהים במיוחד
-- צורך כמות [זכרון קטנה](https://docs.gofiber.io/benchmarks)
-- [נקודות קצה עבור API](https://docs.gofiber.io/context)
-- תמיכה ב-[Middleware](https://docs.gofiber.io/middleware) & [Next](https://docs.gofiber.io/context#next)
-- תכנות [מהיר](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) של צד שרת
-- [מנועי תבניות](https://docs.gofiber.io/middleware#template)
-- [תמיכה ב-WebSocket](https://docs.gofiber.io/middleware#websocket)
-- [הגבלת קצבים ובקשות](https://docs.gofiber.io/middleware#limiter)
-- תורגם ל-12 שפות אחרות
-- והרבה יותר, [חקור את Fiber](https://docs.gofiber.io/)
-
-
-
-
-## 💡 פילוסופיה
-
-
-
-
-gophers חדשים שעושים את המעבר מ-[Node.js](https://nodejs.org/en/about/) ל-[Go](https://golang.org/doc/) מתמודדים עם עקומת למידה לפני שהם יכולים להתחיל לבנות את יישומי האינטרנט או המיקרו-שירותים שלהם.
-Fiber כ-**web framework**, נוצרה עם רעיון **המינימליזם** ועוקבת אחרי **הדרך של UNIX**, כך ש-gophers חדשים יוכלו להיכנס במהירות לעולם של Go עם קבלת פנים חמה ואמינה.
-
-
-
-
-Fiber נוצרה **בהשראת** Express, ה-web framework הפופולרית ביותר ברחבי האינטרנט. שילבנו את **הקלות** של Express ו**הביצועים הגולמיים** של Go. אם אי-פעם מימשתם יישום web ב-Node.js (_באמצעות Express או דומיו_), אז הרבה מהפונקציות והעקרונות ייראו לכם **מאוד מוכרים**.
-
-
-
-
-אנחנו **מקשיבים** למשתמשים שלנו ב-[issues](https://github.com/gofiber/fiber/issues) (_ובכל רחבי האינטרנט_) כדי ליצור web framework **מהירה**, **גמישה**, ו**ידידותית** בשפת Go עבור **כל** משימה, **תאריך יעד** ו**כישורי** מפתח! בדיוק כמו ש-Express מבצע בעולם של JavaScript.
-
-
-
-
-## 👀 דוגמאות
-
-
-
-
-להלן כמה מהדוגמאות הנפוצות.
-
-
-
-
-> אם ברצונכם לראות דוגמאות קוד נוספות, אנא בקרו ב[מאגר המתכונים](https://github.com/gofiber/recipes) שלנו או בקרו ב[תיעוד ה-API](https://docs.gofiber.io) שלנו.
-
-
-
-
-
-### ניתוב
-
-
-
-
-📖 [ניתוב](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-
-
-### הנגשת קבצים סטטיים
-
-
-
-
-📖 [קבצים סטטיים](https://docs.gofiber.io/application#static)
-
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-
-
-### Middleware & Next
-
-
-
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
-
- 📚 הצג דוגמאות קוד נוספות
-
-
-### מנועי תבניות
-
-📖 [הגדרות](https://docs.gofiber.io/application#settings)
-📖 [רנדור](https://docs.gofiber.io/context#render)
-📖 [תבניות](https://docs.gofiber.io/middleware#template)
-
-Fiber תומך כברירת מחדל ב[מנוע התבניות של Go](https://golang.org/pkg/html/template/).
-
-אבל אם ברצונכם להשתמש במנוע תבניות אחר כמו [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) או [pug](https://github.com/Joker/jade).
-
-אתם יכולים להשתמש ב[Middleware של התבניות](https://docs.gofiber.io/middleware#template) שלנו.
-
-
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-
-### קיבוץ routes ל-chains
-
-📖 [קבוצות](https://docs.gofiber.io/application#group)
-
-
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-
-### Middleware של לוגים
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-### שיתוף משאבים בין מקורות (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-
-בדוק את ה-CORS על ידי העברת כל domain ב-header של `Origin`:
-
-
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-
-### תגובת 404 מותאמת אישית
-
-📖 [שיטות HTTP](https://docs.gofiber.io/application#http-methods)
-
-
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-
-### תגובת JSON
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-
-### Middleware של התאוששות
-
-📖 [התאוששות](https://docs.gofiber.io/middleware#recover)
-
-
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-
-
-
-
-## 🧬 Official Middlewares
-
-
-
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-
-
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-
-
-
-
-## 🌱 Third Party Middlewares
-
-
-
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-
-
-
-
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-
-
-
-## 💬 מדיה
-
-
-
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-
-
-
-## 👍 לתרום
-
-
-
-
-אם אתם רוצים לומר **תודה** או/ו לתמוך בפיתוח הפעיל של `Fiber`:
-
-
-
-
-
-1. תוסיפו [GitHub Star](https://github.com/gofiber/fiber/stargazers) לפרויקט.
-2. צייצו לגבי הפרויקט [בטוויטר שלכם](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. כתבו ביקורת או מדריך ב-[Medium](https://medium.com/), [Dev.to](https://dev.to/) או בבלוג האישי שלכם.
-4. עזרו לנו לתרגם את ה-`README` הזה לשפה אחרת.
-5. תמכו בפרויקט על ידי תרומת [כוס קפה](https://buymeacoff.ee/fenny).
-
-
-
-
-
-## ☕ תומכים
-
-
-
-
-Fiber היא פרויקט קוד פתוח שתשלום חשובונתיו מסתמך על תרומות, כגון שם ה-domain שלנו, gitbook, netlify ו-serverless hosting. אם אתם רוצים לתמוך ב-Fiber, אתם יכולים ☕ [**קנו קפה כאן**](https://buymeacoff.ee/fenny).
-
-
-| | משתמש | תרומה |
-| :---------------------------------------------------------- | :---------------------------------------------- | :---- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-
-
-
-## 💻 תורמי קוד
-
-
-
-
-
-
-## ⚠️ רישיון
-
-
-
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-
-
-
-**רישיונות של ספריות צד שלישי**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Fiber היא
web framework בהשראת
Express הבנויה על גבי
Fasthttp, מנוע ה-HTTP
המהיר ביותר עבור
Go.
+ נועדה
להקל על העניינים למען פיתוח
מהיר,
ללא הקצאות זכרון ולוקחת
ביצועים בחשבון.
+
+
+
+
+
+## ⚡️ התחלה מהירה
+
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+
+## ⚙️ התקנה
+
+
+
+
+קודם כל, [הורידו](https://golang.org/dl/) והתקינו את Go. נדרשת גרסה `1.11` ומעלה.
+
+
+
+
+ההתקנה מתבצעת באמצעות הפקודה [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
+
+
+```bash
+go get -u github.com/gofiber/fiber
+```
+
+
+
+## 🤖 מדדים
+
+
+
+
+הבדיקות מבוצעות על ידי [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) ו-[Go Web](https://github.com/smallnest/go-web-framework-benchmark). אם אתם רוצים לראות את כל התוצאות, אנא בקרו ב-[Wiki](https://docs.gofiber.io/benchmarks) שלנו.
+
+
+
+
+
+
+
+
+
+## 🎯 יכולות
+
+
+
+
+- [ניתוב](https://docs.gofiber.io/routing) רובסטי
+- הנגשת [קבצים סטטיים](https://docs.gofiber.io/application#static)
+- [ביצועים](https://docs.gofiber.io/benchmarks) גבוהים במיוחד
+- צורך כמות [זכרון קטנה](https://docs.gofiber.io/benchmarks)
+- [נקודות קצה עבור API](https://docs.gofiber.io/context)
+- תמיכה ב-[Middleware](https://docs.gofiber.io/middleware) & [Next](https://docs.gofiber.io/context#next)
+- תכנות [מהיר](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) של צד שרת
+- [מנועי תבניות](https://docs.gofiber.io/middleware#template)
+- [תמיכה ב-WebSocket](https://docs.gofiber.io/middleware#websocket)
+- [הגבלת קצבים ובקשות](https://docs.gofiber.io/middleware#limiter)
+- תורגם ל-12 שפות אחרות
+- והרבה יותר, [חקור את Fiber](https://docs.gofiber.io/)
+
+
+
+
+## 💡 פילוסופיה
+
+
+
+
+gophers חדשים שעושים את המעבר מ-[Node.js](https://nodejs.org/en/about/) ל-[Go](https://golang.org/doc/) מתמודדים עם עקומת למידה לפני שהם יכולים להתחיל לבנות את יישומי האינטרנט או המיקרו-שירותים שלהם.
+Fiber כ-**web framework**, נוצרה עם רעיון **המינימליזם** ועוקבת אחרי **הדרך של UNIX**, כך ש-gophers חדשים יוכלו להיכנס במהירות לעולם של Go עם קבלת פנים חמה ואמינה.
+
+
+
+
+Fiber נוצרה **בהשראת** Express, ה-web framework הפופולרית ביותר ברחבי האינטרנט. שילבנו את **הקלות** של Express ו**הביצועים הגולמיים** של Go. אם אי-פעם מימשתם יישום web ב-Node.js (_באמצעות Express או דומיו_), אז הרבה מהפונקציות והעקרונות ייראו לכם **מאוד מוכרים**.
+
+
+
+
+אנחנו **מקשיבים** למשתמשים שלנו ב-[issues](https://github.com/gofiber/fiber/issues) (_ובכל רחבי האינטרנט_) כדי ליצור web framework **מהירה**, **גמישה**, ו**ידידותית** בשפת Go עבור **כל** משימה, **תאריך יעד** ו**כישורי** מפתח! בדיוק כמו ש-Express מבצע בעולם של JavaScript.
+
+
+
+
+## 👀 דוגמאות
+
+
+
+
+להלן כמה מהדוגמאות הנפוצות.
+
+
+
+
+> אם ברצונכם לראות דוגמאות קוד נוספות, אנא בקרו ב[מאגר המתכונים](https://github.com/gofiber/recipes) שלנו או בקרו ב[תיעוד ה-API](https://docs.gofiber.io) שלנו.
+
+
+
+
+
+### ניתוב
+
+
+
+
+📖 [ניתוב](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+
+### הנגשת קבצים סטטיים
+
+
+
+
+📖 [קבצים סטטיים](https://docs.gofiber.io/application#static)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+
+
+### Middleware & Next
+
+
+
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+
+ 📚 הצג דוגמאות קוד נוספות
+
+
+### מנועי תבניות
+
+📖 [הגדרות](https://docs.gofiber.io/application#settings)
+📖 [רנדור](https://docs.gofiber.io/context#render)
+📖 [תבניות](https://docs.gofiber.io/middleware#template)
+
+Fiber תומך כברירת מחדל ב[מנוע התבניות של Go](https://golang.org/pkg/html/template/).
+
+אבל אם ברצונכם להשתמש במנוע תבניות אחר כמו [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) או [pug](https://github.com/Joker/jade).
+
+אתם יכולים להשתמש ב[Middleware של התבניות](https://docs.gofiber.io/middleware#template) שלנו.
+
+
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+
+### קיבוץ routes ל-chains
+
+📖 [קבוצות](https://docs.gofiber.io/application#group)
+
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+
+### Middleware של לוגים
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+### שיתוף משאבים בין מקורות (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+
+בדוק את ה-CORS על ידי העברת כל domain ב-header של `Origin`:
+
+
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+
+### תגובת 404 מותאמת אישית
+
+📖 [שיטות HTTP](https://docs.gofiber.io/application#http-methods)
+
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+### תגובת JSON
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+
+### Middleware של התאוששות
+
+📖 [התאוששות](https://docs.gofiber.io/middleware#recover)
+
+
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+
+
+
+
+## 🧬 Official Middlewares
+
+
+
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+
+
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+
+
+
+
+## 🌱 Third Party Middlewares
+
+
+
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+
+
+
+
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+
+
+
+## 💬 מדיה
+
+
+
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+
+
+
+## 👍 לתרום
+
+
+
+
+אם אתם רוצים לומר **תודה** או/ו לתמוך בפיתוח הפעיל של `Fiber`:
+
+
+
+
+
+1. תוסיפו [GitHub Star](https://github.com/gofiber/fiber/stargazers) לפרויקט.
+2. צייצו לגבי הפרויקט [בטוויטר שלכם](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. כתבו ביקורת או מדריך ב-[Medium](https://medium.com/), [Dev.to](https://dev.to/) או בבלוג האישי שלכם.
+4. עזרו לנו לתרגם את ה-`README` הזה לשפה אחרת.
+5. תמכו בפרויקט על ידי תרומת [כוס קפה](https://buymeacoff.ee/fenny).
+
+
+
+
+
+## ☕ תומכים
+
+
+
+
+Fiber היא פרויקט קוד פתוח שתשלום חשובונתיו מסתמך על תרומות, כגון שם ה-domain שלנו, gitbook, netlify ו-serverless hosting. אם אתם רוצים לתמוך ב-Fiber, אתם יכולים ☕ [**קנו קפה כאן**](https://buymeacoff.ee/fenny).
+
+
+| | משתמש | תרומה |
+| :---------------------------------------------------------- | :---------------------------------------------- | :---- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+
+
+
+## 💻 תורמי קוד
+
+
+
+
+
+
+## ⚠️ רישיון
+
+
+
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+
+
+
+**רישיונות של ספריות צד שלישי**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
diff --git a/.github/README_id.md b/.github/README_id.md
index 0e4482c4..9a8abd5e 100644
--- a/.github/README_id.md
+++ b/.github/README_id.md
@@ -1,554 +1,554 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber adalah web framework yang terinspirasi dari Express yang berbasiskan Fasthttp, HTTP engine paling cepat untuk Go. Dirancang untuk mempermudah, mempercepat pengembangan aplikasi dengan alokasi memori nol-nya serta kinerja yang selalu diperhatikan.
-
-
-## ⚡️ Cara Mulai
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Instalasi
-
-Pertama, [unduh](https://golang.org/dl/) dan instal Go di komputer anda. Versi `1.11` atau yang lebih tinggi diperlukan.
-
-Instalasi dilakukkan dengan perintah [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
-
-```bash
-go get -u github.com/gofiber/fiber/...
-```
-
-## 🤖 Pengukuran Kinerja
-
-Pengukuran ini dilakukan oleh [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) dan [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Apabila anda ingin melihat hasil lengkapnya, silahkan kunjungi halaman [Wiki](https://docs.gofiber.io/benchmarks) kami.
-
-
-
-
-
-
-## 🎯 Fitur
-
-- Sistem [Routing](https://docs.gofiber.io/routing) yang solid
-- Serve [file statis](https://docs.gofiber.io/application#static)
-- [Kinerja](https://docs.gofiber.io/benchmarks) ekstrim
-- [Penggunaan memori](https://docs.gofiber.io/benchmarks) yang kecil
-- Cocok untuk [API](https://docs.gofiber.io/context)
-- Mendukung Middleware & [Next](https://docs.gofiber.io/context#next) seperti Express
-- Kembangkan aplikasi dengan [Cepat](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- Dan masih banyak lagi, [kunjungi Fiber](https://docs.gofiber.io/)
-
-## 💡 Filosofi
-
-Bagi yang baru yang beralih dari [Node.js](https://nodejs.org/en/about/) ke [Go](https://golang.org/doc/) terkadang perlu waktu yang cukup lama sebelum mereka mampu membuat aplikasi web dengan Go. Fiber, sebagai **web framework** dirancang secara **minimalis** dan mengikuti filosofi dari **UNIX**, sehingga pengguna baru dengan cepat memasuki dunia Go dengan sambutan yang hangat dan dapat diandalkan.
-
-Fiber terinspirasi dari Express, salah satu web framework paling terkenal di Internet. Kami menggabungkan **kemudahan** dari Express dan **kinerja luar biasa** dari Go. Apabila anda pernah membuat aplikasi dengan Node.js (_dengan Express atau yang lainnya_), maka banyak metode dan prinsip yang akan terasa **sangat umum** bagi anda.
-
-Kami **mendengarkan** para pengguna di [GitHub Issues](https://github.com/gofiber/fiber/issues) (_dan berbagai platform lainnya_) untuk menciptakan web framework yang **cepat**, **fleksibel** dan **bersahabat** untuk berbagai macam keperluan, **tenggat waktu** dan **keahlian** para pengguna! Sama halnya seperti yang dilakukkan Express di dunia JavaScript.
-
-## 👀 Contoh
-
-Dibawah ini terdapat beberapa contoh penggunaan. Jika anda ingin contoh lainnya, silahkan kunjungi [Gudang resep](https://github.com/gofiber/recipes) atau kunjungi [Dokumentasi API](https://docs.gofiber.io) kami.
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Media
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Berkontribusi
-
-Apabila anda ingin mengucapkan **terima kasih** dan/atau mendukung pengembangan `Fiber`:
-
-1. Berikan bintang atau [GitHub Star](https://github.com/gofiber/fiber/stargazers) ke proyek ini.
-2. Bagikan [di Twitter anda](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Buat ulasan atau tutorial di [Medium](https://medium.com/), [Dev.to](https://dev.to/) atau blog pribadi anda.
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber adalah web framework yang terinspirasi dari Express yang berbasiskan Fasthttp, HTTP engine paling cepat untuk Go. Dirancang untuk mempermudah, mempercepat pengembangan aplikasi dengan alokasi memori nol-nya serta kinerja yang selalu diperhatikan.
+
+
+## ⚡️ Cara Mulai
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Instalasi
+
+Pertama, [unduh](https://golang.org/dl/) dan instal Go di komputer anda. Versi `1.11` atau yang lebih tinggi diperlukan.
+
+Instalasi dilakukkan dengan perintah [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
+
+```bash
+go get -u github.com/gofiber/fiber/...
+```
+
+## 🤖 Pengukuran Kinerja
+
+Pengukuran ini dilakukan oleh [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) dan [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Apabila anda ingin melihat hasil lengkapnya, silahkan kunjungi halaman [Wiki](https://docs.gofiber.io/benchmarks) kami.
+
+
+
+
+
+
+## 🎯 Fitur
+
+- Sistem [Routing](https://docs.gofiber.io/routing) yang solid
+- Serve [file statis](https://docs.gofiber.io/application#static)
+- [Kinerja](https://docs.gofiber.io/benchmarks) ekstrim
+- [Penggunaan memori](https://docs.gofiber.io/benchmarks) yang kecil
+- Cocok untuk [API](https://docs.gofiber.io/context)
+- Mendukung Middleware & [Next](https://docs.gofiber.io/context#next) seperti Express
+- Kembangkan aplikasi dengan [Cepat](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- Dan masih banyak lagi, [kunjungi Fiber](https://docs.gofiber.io/)
+
+## 💡 Filosofi
+
+Bagi yang baru yang beralih dari [Node.js](https://nodejs.org/en/about/) ke [Go](https://golang.org/doc/) terkadang perlu waktu yang cukup lama sebelum mereka mampu membuat aplikasi web dengan Go. Fiber, sebagai **web framework** dirancang secara **minimalis** dan mengikuti filosofi dari **UNIX**, sehingga pengguna baru dengan cepat memasuki dunia Go dengan sambutan yang hangat dan dapat diandalkan.
+
+Fiber terinspirasi dari Express, salah satu web framework paling terkenal di Internet. Kami menggabungkan **kemudahan** dari Express dan **kinerja luar biasa** dari Go. Apabila anda pernah membuat aplikasi dengan Node.js (_dengan Express atau yang lainnya_), maka banyak metode dan prinsip yang akan terasa **sangat umum** bagi anda.
+
+Kami **mendengarkan** para pengguna di [GitHub Issues](https://github.com/gofiber/fiber/issues) (_dan berbagai platform lainnya_) untuk menciptakan web framework yang **cepat**, **fleksibel** dan **bersahabat** untuk berbagai macam keperluan, **tenggat waktu** dan **keahlian** para pengguna! Sama halnya seperti yang dilakukkan Express di dunia JavaScript.
+
+## 👀 Contoh
+
+Dibawah ini terdapat beberapa contoh penggunaan. Jika anda ingin contoh lainnya, silahkan kunjungi [Gudang resep](https://github.com/gofiber/recipes) atau kunjungi [Dokumentasi API](https://docs.gofiber.io) kami.
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Media
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Berkontribusi
+
+Apabila anda ingin mengucapkan **terima kasih** dan/atau mendukung pengembangan `Fiber`:
+
+1. Berikan bintang atau [GitHub Star](https://github.com/gofiber/fiber/stargazers) ke proyek ini.
+2. Bagikan [di Twitter anda](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Buat ulasan atau tutorial di [Medium](https://medium.com/), [Dev.to](https://dev.to/) atau blog pribadi anda.
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_ja.md b/.github/README_ja.md
index 26f87b3e..94c33291 100644
--- a/.github/README_ja.md
+++ b/.github/README_ja.md
@@ -1,556 +1,556 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-FIberは、Expressに触発されたWebフレームワークです。Go 最速のHTTPエンジンであるFasthttpで作られています。ゼロメモリアロケーションとパフォーマンスを念頭に置いて設計されており、迅速な開発をサポートします。
-
-
-
-## ⚡️ クイックスタート
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ インストール
-
-まず、Goを[ダウンロード](https://golang.org/dl/)してください。 `1.11`以降が必要です。
-
-そして、[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them)コマンドを使用してインストールしてください。
-
-```bash
-go get -u github.com/gofiber/fiber/...
-```
-
-## 🤖 ベンチマーク
-
-これらのテストは[TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks)および[Go Web](https://github.com/smallnest/go-web-framework-benchmark)によって計測を行っています 。すべての結果を表示するには、 [Wiki](https://docs.gofiber.io/benchmarks)にアクセスしてください。
-
-
-
-
-
-
-## 🎯 機能
-
-- 堅牢な[ルーティング](https://docs.gofiber.io/routing)
-- [静的ファイル](https://docs.gofiber.io/application#static)のサポート
-- 究極の[パフォーマンス](https://docs.gofiber.io/benchmarks)
-- [低メモリ](https://docs.gofiber.io/benchmarks)フットプリント
-- Express [APIエンドポイント](https://docs.gofiber.io/context)
-- Middlewareと[Next](https://docs.gofiber.io/context#next)のサポート
-- [迅速](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)なサーバーサイドプログラミング
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- [Fiber](https://docs.gofiber.io/)をもっと知る
-
-## 💡 哲学
-
-[Node.js](https://nodejs.org/en/about/)から[Go](https://golang.org/doc/) に乗り換えようとしている新しいGopherはWebフレームワークやマイクロサービスの構築を始める前に多くを学ばなければなりません。
-しかし、 **Webフレームワーク**であるFiberは**ミニマリズム**と**UNIX哲学**をもとに作られているため、新しいGopherはスムーズにGoの世界に入ることができます。
-
-Fiberは人気の高いWebフレームワークであるExpressjsに**インスパイア**されています。
-わたしたちは Expressの**手軽さ**とGoの**パフォーマンス**を組み合わせました。
-もしも、WebアプリケーションをExpress等のNode.jsフレームワークで実装した経験があれば、多くの方法や原理がとても**馴染み深い**でしょう。
-
-## 👀 例
-
-以下に一般的な例をいくつか示します。他のコード例をご覧になりたい場合は、 [Recipesリポジトリ](https://github.com/gofiber/recipes)または[APIドキュメント](https://docs.gofiber.io)にアクセスしてください。
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 メディア
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 貢献する
-
-`Fiber`に開発支援してくださるなら:
-
-1. [GitHub Star](https://github.com/gofiber/fiber/stargazers)をつけてください 。
-2. [あなたのTwitterで](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber)プロジェクトについてツイートしてください。
-3. [Medium](https://medium.com/) 、 [Dev.to、](https://dev.to/)または個人のブログでレビューまたはチュートリアルを書いてください。
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+FIberは、Expressに触発されたWebフレームワークです。Go 最速のHTTPエンジンであるFasthttpで作られています。ゼロメモリアロケーションとパフォーマンスを念頭に置いて設計されており、迅速な開発をサポートします。
+
+
+
+## ⚡️ クイックスタート
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ インストール
+
+まず、Goを[ダウンロード](https://golang.org/dl/)してください。 `1.11`以降が必要です。
+
+そして、[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them)コマンドを使用してインストールしてください。
+
+```bash
+go get -u github.com/gofiber/fiber/...
+```
+
+## 🤖 ベンチマーク
+
+これらのテストは[TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks)および[Go Web](https://github.com/smallnest/go-web-framework-benchmark)によって計測を行っています 。すべての結果を表示するには、 [Wiki](https://docs.gofiber.io/benchmarks)にアクセスしてください。
+
+
+
+
+
+
+## 🎯 機能
+
+- 堅牢な[ルーティング](https://docs.gofiber.io/routing)
+- [静的ファイル](https://docs.gofiber.io/application#static)のサポート
+- 究極の[パフォーマンス](https://docs.gofiber.io/benchmarks)
+- [低メモリ](https://docs.gofiber.io/benchmarks)フットプリント
+- Express [APIエンドポイント](https://docs.gofiber.io/context)
+- Middlewareと[Next](https://docs.gofiber.io/context#next)のサポート
+- [迅速](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)なサーバーサイドプログラミング
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- [Fiber](https://docs.gofiber.io/)をもっと知る
+
+## 💡 哲学
+
+[Node.js](https://nodejs.org/en/about/)から[Go](https://golang.org/doc/) に乗り換えようとしている新しいGopherはWebフレームワークやマイクロサービスの構築を始める前に多くを学ばなければなりません。
+しかし、 **Webフレームワーク**であるFiberは**ミニマリズム**と**UNIX哲学**をもとに作られているため、新しいGopherはスムーズにGoの世界に入ることができます。
+
+Fiberは人気の高いWebフレームワークであるExpressjsに**インスパイア**されています。
+わたしたちは Expressの**手軽さ**とGoの**パフォーマンス**を組み合わせました。
+もしも、WebアプリケーションをExpress等のNode.jsフレームワークで実装した経験があれば、多くの方法や原理がとても**馴染み深い**でしょう。
+
+## 👀 例
+
+以下に一般的な例をいくつか示します。他のコード例をご覧になりたい場合は、 [Recipesリポジトリ](https://github.com/gofiber/recipes)または[APIドキュメント](https://docs.gofiber.io)にアクセスしてください。
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 メディア
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 貢献する
+
+`Fiber`に開発支援してくださるなら:
+
+1. [GitHub Star](https://github.com/gofiber/fiber/stargazers)をつけてください 。
+2. [あなたのTwitterで](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber)プロジェクトについてツイートしてください。
+3. [Medium](https://medium.com/) 、 [Dev.to、](https://dev.to/)または個人のブログでレビューまたはチュートリアルを書いてください。
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_ko.md b/.github/README_ko.md
index 214a1a61..1ded80c0 100644
--- a/.github/README_ko.md
+++ b/.github/README_ko.md
@@ -1,556 +1,556 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber는 Express에서 영감을 받고, Go를 위한 가장 빠른 HTTP 엔진인 Fasthttp를 토대로 만들어진 웹 프레임워크 입니다. 비 메모리 할당과 성능을 고려한 빠른 개발을 위해 손쉽게 사용되도록 설계되었습니다.
-
-
-## ⚡️ 빠른 시작
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ 설치
-
-우선, Go를 [다운로드](https://golang.org/dl/)하고 설치합니다. `1.11` 버전 이상이 요구됩니다.
-
-[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) 명령어를 이용해 설치가 완료됩니다:
-
-```bash
-go get -u github.com/gofiber/fiber/...
-```
-
-## 🤖 벤치마크
-
-이 테스트들은 [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks)와 [Go Web](https://github.com/smallnest/go-web-framework-benchmark)을 통해 측정되었습니다. 만약 모든 결과를 보고 싶다면, [Wiki](https://docs.gofiber.io/benchmarks)를 확인해 주세요.
-
-
-
-
-
-
-## 🎯 특징
-
-- 견고한 [라우팅](https://docs.gofiber.io/routing)
-- [정적 파일](https://docs.gofiber.io/application#static) 제공
-- 뛰어난 [성능](https://docs.gofiber.io/benchmarks)
-- [적은 메모리](https://docs.gofiber.io/benchmarks) 공간
-- [API 엔드포인트](https://docs.gofiber.io/context)
-- 미들웨어 & [Next](https://docs.gofiber.io/context#next) 지원
-- [빠른](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) 서버 사이드 프로그래밍
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- 더 알고 싶다면, [Fiber 둘러보기](https://docs.gofiber.io/)
-
-## 💡 철학
-
-[Node.js](https://nodejs.org/en/about/)에서 [Go](https://golang.org/doc/)로 전환하는 새로운 고퍼분들은 웹 어플리케이션이나 마이크로 서비스 개발을 시작할 수 있게 되기 전에 학습 곡선에 시달리고 있습니다. Fiber는 **웹 프레임워크**로서, 새로운 고퍼분들이 따뜻하고 믿음직한 환영을 가지고 빠르게 Go의 세상에 진입할 수 있게 **미니멀리즘**의 개념과 **UNIX 방식**에 따라 개발되었습니다.
-
-Fiber는 인터넷에서 가장 인기있는 웹 프레임워크인 Express에서 **영감을 받았습니다.** 우리는 Express의 **쉬운** 사용과 Go의 **성능**을 결합하였습니다. 만약 당신이 Node.js (Express 또는 비슷한 것을 사용하여) 로 웹 어플리케이션을 개발한 경험이 있다면, 많은 메소드들과 원리들이 **매우 비슷하게** 느껴질 것 입니다.
-
-우리는 **어떤한** 작업, **마감일정**, 개발자의 **기술**이던간에 **빠르고**, **유연하고**, **익숙한** Go 웹 프레임워크를 만들기 위해 사용자들의 [이슈들](https://github.com/gofiber/fiber/issues)을(그리고 모든 인터넷을 통해) **듣고 있습니다**! Express가 자바스크립트 세계에서 하는 것 처럼요.
-
-## 👀 예제
-
-다음은 일반적인 예제들 입니다.
-
-> 더 많은 코드 예제를 보고 싶다면, [Recipes 저장소](https://github.com/gofiber/recipes) 또는 [API 문서](https://docs.gofiber.io)를 방문하세요.
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 미디어
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 기여
-
-`Fiber`의 활발한 개발을 지원하고 감사 인사를 하고 싶다면:
-
-1. 프로젝트에 [GitHub Star](https://github.com/gofiber/fiber/stargazers)를 추가하세요.
-2. [트위터에서](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber) 프로젝트에 대해 트윗하세요.
-3. [Medium](https://medium.com/), [Dev.to](https://dev.to/) 또는 개인 블로그에 리뷰 또는 튜토리얼을 작성하세요.
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber는 Express에서 영감을 받고, Go를 위한 가장 빠른 HTTP 엔진인 Fasthttp를 토대로 만들어진 웹 프레임워크 입니다. 비 메모리 할당과 성능을 고려한 빠른 개발을 위해 손쉽게 사용되도록 설계되었습니다.
+
+
+## ⚡️ 빠른 시작
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ 설치
+
+우선, Go를 [다운로드](https://golang.org/dl/)하고 설치합니다. `1.11` 버전 이상이 요구됩니다.
+
+[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) 명령어를 이용해 설치가 완료됩니다:
+
+```bash
+go get -u github.com/gofiber/fiber/...
+```
+
+## 🤖 벤치마크
+
+이 테스트들은 [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks)와 [Go Web](https://github.com/smallnest/go-web-framework-benchmark)을 통해 측정되었습니다. 만약 모든 결과를 보고 싶다면, [Wiki](https://docs.gofiber.io/benchmarks)를 확인해 주세요.
+
+
+
+
+
+
+## 🎯 특징
+
+- 견고한 [라우팅](https://docs.gofiber.io/routing)
+- [정적 파일](https://docs.gofiber.io/application#static) 제공
+- 뛰어난 [성능](https://docs.gofiber.io/benchmarks)
+- [적은 메모리](https://docs.gofiber.io/benchmarks) 공간
+- [API 엔드포인트](https://docs.gofiber.io/context)
+- 미들웨어 & [Next](https://docs.gofiber.io/context#next) 지원
+- [빠른](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) 서버 사이드 프로그래밍
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- 더 알고 싶다면, [Fiber 둘러보기](https://docs.gofiber.io/)
+
+## 💡 철학
+
+[Node.js](https://nodejs.org/en/about/)에서 [Go](https://golang.org/doc/)로 전환하는 새로운 고퍼분들은 웹 어플리케이션이나 마이크로 서비스 개발을 시작할 수 있게 되기 전에 학습 곡선에 시달리고 있습니다. Fiber는 **웹 프레임워크**로서, 새로운 고퍼분들이 따뜻하고 믿음직한 환영을 가지고 빠르게 Go의 세상에 진입할 수 있게 **미니멀리즘**의 개념과 **UNIX 방식**에 따라 개발되었습니다.
+
+Fiber는 인터넷에서 가장 인기있는 웹 프레임워크인 Express에서 **영감을 받았습니다.** 우리는 Express의 **쉬운** 사용과 Go의 **성능**을 결합하였습니다. 만약 당신이 Node.js (Express 또는 비슷한 것을 사용하여) 로 웹 어플리케이션을 개발한 경험이 있다면, 많은 메소드들과 원리들이 **매우 비슷하게** 느껴질 것 입니다.
+
+우리는 **어떤한** 작업, **마감일정**, 개발자의 **기술**이던간에 **빠르고**, **유연하고**, **익숙한** Go 웹 프레임워크를 만들기 위해 사용자들의 [이슈들](https://github.com/gofiber/fiber/issues)을(그리고 모든 인터넷을 통해) **듣고 있습니다**! Express가 자바스크립트 세계에서 하는 것 처럼요.
+
+## 👀 예제
+
+다음은 일반적인 예제들 입니다.
+
+> 더 많은 코드 예제를 보고 싶다면, [Recipes 저장소](https://github.com/gofiber/recipes) 또는 [API 문서](https://docs.gofiber.io)를 방문하세요.
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 미디어
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 기여
+
+`Fiber`의 활발한 개발을 지원하고 감사 인사를 하고 싶다면:
+
+1. 프로젝트에 [GitHub Star](https://github.com/gofiber/fiber/stargazers)를 추가하세요.
+2. [트위터에서](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber) 프로젝트에 대해 트윗하세요.
+3. [Medium](https://medium.com/), [Dev.to](https://dev.to/) 또는 개인 블로그에 리뷰 또는 튜토리얼을 작성하세요.
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_nl.md b/.github/README_nl.md
index bf9e8fd5..4906c749 100644
--- a/.github/README_nl.md
+++ b/.github/README_nl.md
@@ -1,556 +1,556 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber is een web framework geïnspireerd door Express gebouwd bovenop Fasthttp, de snelste HTTP-engine voor Go. Ontworpen om snelle ontwikkeling gemakkelijker te maken zonder geheugenallocatie tezamen met hoge prestaties.
-
-
-## ⚡️ Bliksemsnelle start
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hallo, Wereld!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Installatie
-
-Allereerst, [download](https://golang.org/dl/) en installeer Go. `1.11` of hoger is vereist.
-
-Installatie wordt gedaan met behulp van het [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) commando:
-
-```bash
-go get -u github.com/gofiber/fiber
-```
-
-## 🤖 Benchmarks
-
-Deze tests zijn uitgevoerd door [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) en [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Bezoek onze [Wiki](https://fiber.wiki/benchmarks) voor alle benchmark resultaten.
-
-
-
-
-
-
-## 🎯 Features
-
-- Robuuste [routing](https://fiber.wiki/routing)
-- Serveer [statische bestanden](https://fiber.wiki/application#static)
-- Extreme [prestaties](https://fiber.wiki/benchmarks)
-- [Weinig geheugenruimte](https://fiber.wiki/benchmarks)
-- [API endpoints](https://fiber.wiki/context)
-- [Middleware](https://fiber.wiki/middleware) & [Next](https://fiber.wiki/context#next) ondersteuning
-- [Snelle](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) server-side programmering
-- [Template engines](https://fiber.wiki/middleware#template)
-- [WebSocket ondersteuning](https://fiber.wiki/middleware#websocket)
-- [Rate Limiter](https://fiber.wiki/middleware#limiter)
-- Vertaald in 12 andere talen
-- En nog veel meer, [ontdek Fiber](https://fiber.wiki/)
-
-## 💡 Filosofie
-
-Nieuwe gophers die de overstap maken van [Node.js](https://nodejs.org/en/about/) naar [Go](https://golang.org/doc/), hebben te maken met een leercurve voordat ze kunnen beginnen met het bouwen van hun webapplicaties of microservices. Fiber, als een **web framework**, is gebouwd met het idee van **minimalisme** en volgt de **UNIX-manier**, zodat nieuwe gophers snel de wereld van Go kunnen betreden met een warm en vertrouwd welkom.\
-
-Fiber is **geïnspireerd** door Express, het populairste webframework op internet. We hebben het **gemak** van Express gecombineerd met de **onbewerkte prestaties** van Go. Als je ooit een webapplicatie in Node.js hebt geïmplementeerd (_zoals Express of vergelijkbaar_), dan zullen veel methoden en principes **heel gewoon** voor je lijken.
-
-We **luisteren** naar onze gebruikers in [issues](https://github.com/gofiber/fiber/issues) (_en overal op het internet_) om een **snelle**, **flexibele** en **vriendelijk** Go web framework te maken voor **elke** taak, **deadline** en ontwikkelaar **vaardigheid**! Net zoals Express dat doet in de JavaScript-wereld.
-
-## 👀 Voorbeelden
-
-Hieronder staan enkele van de meest voorkomende voorbeelden.
-
-> Bekijk ons [Recepten repository](https://github.com/gofiber/recipes) voor meer voorbeelden met code of bezoek onze [API documentatie](https://fiber.wiki).
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Media
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Bijdragen
-
-Om de actieve ontwikkelingen van `Fiber` te ondersteunen of om een **bedankje** te geven:
-
-1. Voeg een [GitHub Star](https://github.com/gofiber/fiber/stargazers) toe aan het project.
-2. Tweet over het project [op je Twitter account](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Schrijf een recensie of tutorial op [Medium](https://medium.com/), [Dev.to](https://dev.to/) of een persoonlijke blog.
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber is een web framework geïnspireerd door Express gebouwd bovenop Fasthttp, de snelste HTTP-engine voor Go. Ontworpen om snelle ontwikkeling gemakkelijker te maken zonder geheugenallocatie tezamen met hoge prestaties.
+
+
+## ⚡️ Bliksemsnelle start
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hallo, Wereld!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Installatie
+
+Allereerst, [download](https://golang.org/dl/) en installeer Go. `1.11` of hoger is vereist.
+
+Installatie wordt gedaan met behulp van het [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) commando:
+
+```bash
+go get -u github.com/gofiber/fiber
+```
+
+## 🤖 Benchmarks
+
+Deze tests zijn uitgevoerd door [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) en [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Bezoek onze [Wiki](https://fiber.wiki/benchmarks) voor alle benchmark resultaten.
+
+
+
+
+
+
+## 🎯 Features
+
+- Robuuste [routing](https://fiber.wiki/routing)
+- Serveer [statische bestanden](https://fiber.wiki/application#static)
+- Extreme [prestaties](https://fiber.wiki/benchmarks)
+- [Weinig geheugenruimte](https://fiber.wiki/benchmarks)
+- [API endpoints](https://fiber.wiki/context)
+- [Middleware](https://fiber.wiki/middleware) & [Next](https://fiber.wiki/context#next) ondersteuning
+- [Snelle](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) server-side programmering
+- [Template engines](https://fiber.wiki/middleware#template)
+- [WebSocket ondersteuning](https://fiber.wiki/middleware#websocket)
+- [Rate Limiter](https://fiber.wiki/middleware#limiter)
+- Vertaald in 12 andere talen
+- En nog veel meer, [ontdek Fiber](https://fiber.wiki/)
+
+## 💡 Filosofie
+
+Nieuwe gophers die de overstap maken van [Node.js](https://nodejs.org/en/about/) naar [Go](https://golang.org/doc/), hebben te maken met een leercurve voordat ze kunnen beginnen met het bouwen van hun webapplicaties of microservices. Fiber, als een **web framework**, is gebouwd met het idee van **minimalisme** en volgt de **UNIX-manier**, zodat nieuwe gophers snel de wereld van Go kunnen betreden met een warm en vertrouwd welkom.\
+
+Fiber is **geïnspireerd** door Express, het populairste webframework op internet. We hebben het **gemak** van Express gecombineerd met de **onbewerkte prestaties** van Go. Als je ooit een webapplicatie in Node.js hebt geïmplementeerd (_zoals Express of vergelijkbaar_), dan zullen veel methoden en principes **heel gewoon** voor je lijken.
+
+We **luisteren** naar onze gebruikers in [issues](https://github.com/gofiber/fiber/issues) (_en overal op het internet_) om een **snelle**, **flexibele** en **vriendelijk** Go web framework te maken voor **elke** taak, **deadline** en ontwikkelaar **vaardigheid**! Net zoals Express dat doet in de JavaScript-wereld.
+
+## 👀 Voorbeelden
+
+Hieronder staan enkele van de meest voorkomende voorbeelden.
+
+> Bekijk ons [Recepten repository](https://github.com/gofiber/recipes) voor meer voorbeelden met code of bezoek onze [API documentatie](https://fiber.wiki).
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Media
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Bijdragen
+
+Om de actieve ontwikkelingen van `Fiber` te ondersteunen of om een **bedankje** te geven:
+
+1. Voeg een [GitHub Star](https://github.com/gofiber/fiber/stargazers) toe aan het project.
+2. Tweet over het project [op je Twitter account](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Schrijf een recensie of tutorial op [Medium](https://medium.com/), [Dev.to](https://dev.to/) of een persoonlijke blog.
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_pt.md b/.github/README_pt.md
index e708a3c6..99ca0477 100644
--- a/.github/README_pt.md
+++ b/.github/README_pt.md
@@ -1,552 +1,552 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Fiber é um framework web inspirado no Express, construído sobre o Fasthttp, o motor HTTP mais rápido do Go. Projetado para facilitar e acelerar o desenvolvimento, com zero de alocação de memória e desempenho em mente.
-
-
-## ⚡️ Início rápido
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Instalação
-
-Primeiro de tudo, faça o [download](https://golang.org/dl/) e instale o Go. É necessário a versão `1.11` ou superior.
-
-A instalação é feita usando o comando [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) :
-
-```bash
-go get -u github.com/gofiber/fiber/...
-```
-
-## 🤖 Benchmarks
-
-Esses testes são realizados pelo [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) e [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Se você quiser ver todos os resultados, visite nosso [Wiki](https://docs.gofiber.io/benchmarks) .
-
-
-
-
-
-
-## 🎯 Recursos
-
-- [Roteamento](https://docs.gofiber.io/routing) robusto
-- Servir [arquivos estáticos](https://docs.gofiber.io/application#static)
-- [Desempenho](https://docs.gofiber.io/benchmarks) extremo
-- [Baixo consumo de memória](https://docs.gofiber.io/benchmarks)
-- [API de rotas](https://docs.gofiber.io/context)
-- Suporte para Middleware e [Next](https://docs.gofiber.io/context#next)
-- Programação [rápida](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) de aplicações de servidor
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- E muito mais, [explore o Fiber](https://docs.gofiber.io/)
-
-## 💡 Filosofia
-
-Os novos gophers que mudaram do [Node.js](https://nodejs.org/en/about/) para o [Go](https://golang.org/doc/) estão tendo que lidar com uma curva de aprendizado antes que possam começar a criar seus aplicativos web ou microsserviços. O Fiber, como um **framework web**, foi criado com a ideia de ser **minimalista** e seguindo o **caminho UNIX**, para que novos gophers possam, rapidamente, entrar no mundo do Go com uma recepção calorosa e confiável.
-
-O Fiber é **inspirado** no Express, o framework web mais popular da Internet. Combinamos a **facilidade** do Express e o **desempenho bruto** do Go. Se você já implementou um aplicativo web com Node.js ( _usando Express.js ou similar_ ), então muitos métodos e princípios parecerão **muito comuns** para você.
-
-## 👀 Exemplos
-
-Listados abaixo estão alguns exemplos comuns. Se você quiser ver mais exemplos de código, visite nosso [repositório de receitas](https://github.com/gofiber/recipes) ou a [documentação da API](https://docs.gofiber.io).
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Mídia
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Contribuindo
-
-Se você quer **agradecer** e/ou apoiar o desenvolvimento ativo do `Fiber`:
-
-1. Deixe uma [estrela no GitHub](https://github.com/gofiber/fiber/stargazers) do projeto.
-2. Tweet sobre o projeto [no seu Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Escreva um review ou tutorial no [Medium](https://medium.com/), [Dev.to](https://dev.to/) ou blog pessoal.
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Fiber é um framework web inspirado no Express, construído sobre o Fasthttp, o motor HTTP mais rápido do Go. Projetado para facilitar e acelerar o desenvolvimento, com zero de alocação de memória e desempenho em mente.
+
+
+## ⚡️ Início rápido
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Instalação
+
+Primeiro de tudo, faça o [download](https://golang.org/dl/) e instale o Go. É necessário a versão `1.11` ou superior.
+
+A instalação é feita usando o comando [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) :
+
+```bash
+go get -u github.com/gofiber/fiber/...
+```
+
+## 🤖 Benchmarks
+
+Esses testes são realizados pelo [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) e [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Se você quiser ver todos os resultados, visite nosso [Wiki](https://docs.gofiber.io/benchmarks) .
+
+
+
+
+
+
+## 🎯 Recursos
+
+- [Roteamento](https://docs.gofiber.io/routing) robusto
+- Servir [arquivos estáticos](https://docs.gofiber.io/application#static)
+- [Desempenho](https://docs.gofiber.io/benchmarks) extremo
+- [Baixo consumo de memória](https://docs.gofiber.io/benchmarks)
+- [API de rotas](https://docs.gofiber.io/context)
+- Suporte para Middleware e [Next](https://docs.gofiber.io/context#next)
+- Programação [rápida](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) de aplicações de servidor
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- E muito mais, [explore o Fiber](https://docs.gofiber.io/)
+
+## 💡 Filosofia
+
+Os novos gophers que mudaram do [Node.js](https://nodejs.org/en/about/) para o [Go](https://golang.org/doc/) estão tendo que lidar com uma curva de aprendizado antes que possam começar a criar seus aplicativos web ou microsserviços. O Fiber, como um **framework web**, foi criado com a ideia de ser **minimalista** e seguindo o **caminho UNIX**, para que novos gophers possam, rapidamente, entrar no mundo do Go com uma recepção calorosa e confiável.
+
+O Fiber é **inspirado** no Express, o framework web mais popular da Internet. Combinamos a **facilidade** do Express e o **desempenho bruto** do Go. Se você já implementou um aplicativo web com Node.js ( _usando Express.js ou similar_ ), então muitos métodos e princípios parecerão **muito comuns** para você.
+
+## 👀 Exemplos
+
+Listados abaixo estão alguns exemplos comuns. Se você quiser ver mais exemplos de código, visite nosso [repositório de receitas](https://github.com/gofiber/recipes) ou a [documentação da API](https://docs.gofiber.io).
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Mídia
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Contribuindo
+
+Se você quer **agradecer** e/ou apoiar o desenvolvimento ativo do `Fiber`:
+
+1. Deixe uma [estrela no GitHub](https://github.com/gofiber/fiber/stargazers) do projeto.
+2. Tweet sobre o projeto [no seu Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Escreva um review ou tutorial no [Medium](https://medium.com/), [Dev.to](https://dev.to/) ou blog pessoal.
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_ru.md b/.github/README_ru.md
index a0db54b8..670e12a3 100644
--- a/.github/README_ru.md
+++ b/.github/README_ru.md
@@ -1,557 +1,557 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber — это веб фреймворк, который был вдохновлен Express и основан на Fasthttp, самом быстром HTTP-движке написанном на Go. Фреймворк был разработан с целью упростить процесс быстрой разработки высокопроизводительных веб-приложений с нулевым распределением памяти.
-
-
-## ⚡️ Быстрый старт
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Установка
-
-Прежде всего, [скачайте](https://golang.org/dl/) и установите Go. Версия **1.11** или выше.
-
-Установка выполняется с помощью команды [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
-
-```bash
-go get -u github.com/gofiber/fiber
-```
-
-## 🤖 Бенчмарки
-
-Тестирование проводилось с помощью [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) и [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Если вы хотите увидеть все результаты, пожалуйста, посетите наш [Wiki](https://docs.gofiber.io/benchmarks).
-
-
-
-
-
-
-## 🎯 Особенности
-
-- Надежная [маршрутизация](https://docs.gofiber.io/routing)
-- Доступ к [статичным файлам](https://docs.gofiber.io/application#static)
-- Экстремальная [производительность](https://docs.gofiber.io/benchmarks)
-- [Низкий объем потребления памяти](https://docs.gofiber.io/benchmarks)
-- [Эндпоинты](https://docs.gofiber.io/context), как в [API](https://docs.gofiber.io/context) Express
-- [Middleware](https://docs.gofiber.io/middleware) и поддержка [Next](https://docs.gofiber.io/context#next)
-- [Быстрое](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) программирование на стороне сервера
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [Поддержка WebSocket](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Документация доступна на [12 языках](https://docs.gofiber.io/)
-- И многое другое, [посетите наш Wiki](https://docs.gofiber.io/)
-
-## 💡 Философия
-
-Новые Go-программисты, которые переключаются с [Node.js](https://nodejs.org/en/about/) на [Go](https://golang.org/doc/), имеют дело с очень извилистой кривой обучения, прежде чем они смогут начать создавать свои веб-приложения или микросервисы. Fiber, как **веб-фреймворк**, был создан с идеей **минимализма** и следовал **принципу UNIX**, так что новички смогут быстро войти в мир Go без особых проблем.
-
-Fiber **вдохновлен** Express, самым популярным веб фреймворком в Интернете. Мы объединили **простоту** Express и **чистую производительность** Go. Если вы когда-либо реализовывали веб-приложение на Node.js (*с использованием Express или аналогичного фреймворка*), то многие методы и принципы покажутся вам **очень знакомыми**.
-
-Мы **прислушиваемся** к нашим пользователям в [issues](https://github.com/gofiber/fiber/issues), Discord [канале](https://gofiber.io/discord) _и в остальном Интернете_, чтобы создать **быстрый**, **гибкий** и **дружелюбный** веб фреймворк на Go для **любых** задач, **дедлайнов** и **уровней** разработчиков! Как это делает Express в мире JavaScript.
-
-## 👀 Примеры
-
-Ниже перечислены некоторые из распространенных примеров. Если вы хотите увидеть больше примеров кода, пожалуйста, посетите наш [репозиторий рецептов](https://github.com/gofiber/recipes) или [документацию по API](https://docs.gofiber.io).
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Показать больше примеров кода
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber поддерживает [Go template engine](https://golang.org/pkg/html/template/) по умолчанию.
-
-Но, вы можете использовать сторонний шаблонизатор. Например, [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) или [pug](https://github.com/Joker/jade).
-
-Вы можете использовать [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Проверем CORS, присвоив домен в заголовок `Origin`, отличный от `localhost`:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Официальные Middlewares
-
-Чтобы создать более _поддерживаемую_ middleware _экосистему_, мы вынесли [middlewares](https://docs.gofiber.io/middleware) в отдельные репозитории:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Middlewares от сторонних разработчиков
-
-Это список middlewares, созданных сообществом Fiber. Пожалуйста, [создайте PR](https://github.com/gofiber/fiber/pulls), если хотите добавить в этот список свой или известный вам middleware для веб фреймворка Fiber!
-
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Медиа
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Помощь проекту
-
-Если вы хотите сказать **спасибо** и/или поддержать активное развитие `Fiber`:
-
-1. Добавьте [GitHub Star](https://github.com/gofiber/fiber/stargazers) в проект.
-2. Напишите о проекте [в вашем Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
-3. Сделайте обзор фреймворка на [Medium](https://medium.com/), [Dev.to](https://dev.to/) или в личном блоге.
-4. Помогите перевести нашу API документацию на платформе [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Поддержите проект, купив [чашку кофе](https://buymeacoff.ee/fenny).
-
-## ☕ Поддержка проекта
-
-Fiber — это проект с открытым исходным кодом, который работает на пожертвования для оплаты счетов, например, нашего доменного имени, GitBook, Netlify и serverless-хостинга.
-
-Если вы хотите поддержать, то ☕ [**купите чашку кофе**](https://buymeacoff.ee/fenny).
-
-| | Пользователи | Пожертвования |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Контрибьютеры
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber — это веб фреймворк, который был вдохновлен Express и основан на Fasthttp, самом быстром HTTP-движке написанном на Go. Фреймворк был разработан с целью упростить процесс быстрой разработки высокопроизводительных веб-приложений с нулевым распределением памяти.
+
+
+## ⚡️ Быстрый старт
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Установка
+
+Прежде всего, [скачайте](https://golang.org/dl/) и установите Go. Версия **1.11** или выше.
+
+Установка выполняется с помощью команды [`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them):
+
+```bash
+go get -u github.com/gofiber/fiber
+```
+
+## 🤖 Бенчмарки
+
+Тестирование проводилось с помощью [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) и [Go Web](https://github.com/smallnest/go-web-framework-benchmark). Если вы хотите увидеть все результаты, пожалуйста, посетите наш [Wiki](https://docs.gofiber.io/benchmarks).
+
+
+
+
+
+
+## 🎯 Особенности
+
+- Надежная [маршрутизация](https://docs.gofiber.io/routing)
+- Доступ к [статичным файлам](https://docs.gofiber.io/application#static)
+- Экстремальная [производительность](https://docs.gofiber.io/benchmarks)
+- [Низкий объем потребления памяти](https://docs.gofiber.io/benchmarks)
+- [Эндпоинты](https://docs.gofiber.io/context), как в [API](https://docs.gofiber.io/context) Express
+- [Middleware](https://docs.gofiber.io/middleware) и поддержка [Next](https://docs.gofiber.io/context#next)
+- [Быстрое](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) программирование на стороне сервера
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [Поддержка WebSocket](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Документация доступна на [12 языках](https://docs.gofiber.io/)
+- И многое другое, [посетите наш Wiki](https://docs.gofiber.io/)
+
+## 💡 Философия
+
+Новые Go-программисты, которые переключаются с [Node.js](https://nodejs.org/en/about/) на [Go](https://golang.org/doc/), имеют дело с очень извилистой кривой обучения, прежде чем они смогут начать создавать свои веб-приложения или микросервисы. Fiber, как **веб-фреймворк**, был создан с идеей **минимализма** и следовал **принципу UNIX**, так что новички смогут быстро войти в мир Go без особых проблем.
+
+Fiber **вдохновлен** Express, самым популярным веб фреймворком в Интернете. Мы объединили **простоту** Express и **чистую производительность** Go. Если вы когда-либо реализовывали веб-приложение на Node.js (*с использованием Express или аналогичного фреймворка*), то многие методы и принципы покажутся вам **очень знакомыми**.
+
+Мы **прислушиваемся** к нашим пользователям в [issues](https://github.com/gofiber/fiber/issues), Discord [канале](https://gofiber.io/discord) _и в остальном Интернете_, чтобы создать **быстрый**, **гибкий** и **дружелюбный** веб фреймворк на Go для **любых** задач, **дедлайнов** и **уровней** разработчиков! Как это делает Express в мире JavaScript.
+
+## 👀 Примеры
+
+Ниже перечислены некоторые из распространенных примеров. Если вы хотите увидеть больше примеров кода, пожалуйста, посетите наш [репозиторий рецептов](https://github.com/gofiber/recipes) или [документацию по API](https://docs.gofiber.io).
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Показать больше примеров кода
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber поддерживает [Go template engine](https://golang.org/pkg/html/template/) по умолчанию.
+
+Но, вы можете использовать сторонний шаблонизатор. Например, [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) или [pug](https://github.com/Joker/jade).
+
+Вы можете использовать [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Проверем CORS, присвоив домен в заголовок `Origin`, отличный от `localhost`:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Официальные Middlewares
+
+Чтобы создать более _поддерживаемую_ middleware _экосистему_, мы вынесли [middlewares](https://docs.gofiber.io/middleware) в отдельные репозитории:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Middlewares от сторонних разработчиков
+
+Это список middlewares, созданных сообществом Fiber. Пожалуйста, [создайте PR](https://github.com/gofiber/fiber/pulls), если хотите добавить в этот список свой или известный вам middleware для веб фреймворка Fiber!
+
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Медиа
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Помощь проекту
+
+Если вы хотите сказать **спасибо** и/или поддержать активное развитие `Fiber`:
+
+1. Добавьте [GitHub Star](https://github.com/gofiber/fiber/stargazers) в проект.
+2. Напишите о проекте [в вашем Twitter](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
+3. Сделайте обзор фреймворка на [Medium](https://medium.com/), [Dev.to](https://dev.to/) или в личном блоге.
+4. Помогите перевести нашу API документацию на платформе [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Поддержите проект, купив [чашку кофе](https://buymeacoff.ee/fenny).
+
+## ☕ Поддержка проекта
+
+Fiber — это проект с открытым исходным кодом, который работает на пожертвования для оплаты счетов, например, нашего доменного имени, GitBook, Netlify и serverless-хостинга.
+
+Если вы хотите поддержать, то ☕ [**купите чашку кофе**](https://buymeacoff.ee/fenny).
+
+| | Пользователи | Пожертвования |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Контрибьютеры
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_tr.md b/.github/README_tr.md
index a435a5ff..df801890 100644
--- a/.github/README_tr.md
+++ b/.github/README_tr.md
@@ -1,550 +1,550 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber, Go için en hızlı HTTP motoru olan Fasthttp üzerine inşa edilmiş, Express den ilham alan bir web çatısıdır. Sıfır bellek ayırma ve performans göz önünde bulundurularak hızlı geliştirme için işleri kolaylaştırmak üzere tasarlandı.
-
-
-## ⚡️ Hızlı Başlangıç
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Merhaba dünya!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ Kurulum
-
-İlk önce, Go yu [indirip](https://golang.org/dl/) kuruyoruz. `1.11` veya daha yeni sürüm gereklidir.
-
-[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) komutunu kullanarak kurulumu tamamlıyoruz:
-
-```bash
-go get -u github.com/gofiber/fiber/...
-```
-
-## 🤖 Performans Ölçümleri
-
-Bu testler [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) ve [Go Web](https://github.com/smallnest/go-web-framework-benchmark) ile koşuldu. Bütün sonuçları görmek için lütfen [Wiki](https://docs.gofiber.io/benchmarks) sayfasını ziyaret ediniz.
-
-
-
-
-
-
-## 🎯 Özellikler
-
-- Güçlü [rotalar](https://docs.gofiber.io/routing)
-- [Statik dosya](https://docs.gofiber.io/application#static) yönetimi
-- Olağanüstü [performans](https://docs.gofiber.io/benchmarks)
-- [Düşük bellek](https://docs.gofiber.io/benchmarks) tüketimi
-- [API uç noktaları](https://docs.gofiber.io/context)
-- Ara katman & [Sonraki](https://docs.gofiber.io/context#next) desteği
-- [Hızlı](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) sunucu taraflı programlama
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- Ve daha fazlası, [Fiber ı keşfet](https://docs.gofiber.io/)
-
-## 💡 Felsefe
-
-[Node.js](https://nodejs.org/en/about/) den [Go](https://golang.org/doc/) ya geçen yeni gopher lar kendi web uygulamalarını ve mikroservislerini yazmaya başlamadan önce dili öğrenmek ile uğraşıyorlar. Fiber, bir **web çatısı** olarak, **minimalizm** ve **UNIX yolu**nu izlemek fikri ile oluşturuldu. Böylece yeni gopher lar sıcak ve güvenilir bir hoşgeldin ile Go dünyasına giriş yapabilirler.
-
-Fiber internet üzerinde en popüler olan Express web çatısından **esinlenmiştir**. Biz Express in **kolaylığını** ve Go nun **ham performansını** birleştirdik. Daha önce Node.js üzerinde (Express veya benzerini kullanarak) bir web uygulaması geliştirdiyseniz, pek çok metod ve prensip size **çok tanıdık** gelecektir.
-
-## 👀 Örnekler
-
-Aşağıda yaygın örneklerden bazıları listelenmiştir. Daha fazla kod örneği görmek için, lütfen [Kod deposunu](https://github.com/gofiber/recipes) veya [API dökümantasyonunu](https://docs.gofiber.io) ziyaret ediniz.
-
-### Rotalama
-
-📖 [Rotalama](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john http methodunu çağır
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john http methodunu çağır
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register http methodunu çağır
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Statik Dosyaları Servis Etmek
-
-📖 [Statik](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Ara Katman ve İleri(Middleware & Next)
-
-📖 [Ara Katman](https://docs.gofiber.io/routing#middleware)
-📖 [İleri](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Bütün rotalarla eşleş
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // /api ile başlayan tüm rotalarla eşleş
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register http methodunu çağır
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Daha fazla kod örneği göster
-
-### Şablon Motorları
-
-📖 [Ayarlar](https://docs.gofiber.io/application#settings)
-📖 [Tasvir et(Render)](https://docs.gofiber.io/context#render)
-📖 [Şablonlar](https://docs.gofiber.io/middleware#template)
-
-Fiber varsayılan olarak [Go şablon motoru](https://golang.org/pkg/html/template/)'nu destekler.
-
-Eğer başka bir şablon motoru kullanmak isterseniz, mesela [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) yada [pug](https://github.com/Joker/jade) gibi, bizim [Şablon Ara Katmanımızı](https://docs.gofiber.io/middleware#template) da kullanabilirsiniz.
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- //Uygulamayı başlatmadan önce şablon motorunu kurabilirsiniz:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // YADA uygulamayı başlattıktan sonra uygun yere koyabilirsiniz:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // Ve şimdi, bu şekide `./views/home.tmpl` şablonunu çağırabilirsiniz:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Rotaları Zincirlere Gruplama
-
-📖 [Grup](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Kök API rotası
- api := app.Group("/api", cors()) // /api
-
- // API v1 rotası
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 rotası
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Ara Katman Günlükcüsü(Logger)
-
-📖 [Günlükcü](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Tercihe bağlı günlük ayarları
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Günlükcüyü ayarla
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Farklı Merkezler Arası Kaynak Paylaşımı (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // Varsayılan ayarlarla CORS
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-`Origin` başlığı içinde herhangı bir alan adı kullanarak CORS'u kontrol et:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Özelleştirilebilir 404 yanıtları
-
-📖 [HTTP Methodlari](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Herhangi bir şeyle eşleşen son ara katman
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Yanıtları
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Yükseltmesi
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Ara Katman'dan Kurtarma
-
-📖 [Kurtar](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Özelleştirilebilir kurtarma ayarı
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Özelleştrilebilir günlükleme
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 Medya
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 Destek
-
-Eğer **teşekkür etmek** ve/veya `Fiber`'in aktif geliştirilmesini desteklemek istiyorsanız:
-
-1. Projeye [GitHub Yıldızı](https://github.com/gofiber/fiber/stargazers) verin.
-2. [Twitter hesabınızdan](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber) proje hakkında tweet atın.
-3. [Medium](https://medium.com/), [Dev.to](https://dev.to/) veya kişisel blog üzerinden bir inceleme veya eğitici yazı yazın.
-4. API dökümantasyonunu çevirerek destek olabilirsiniz [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Projeye [bir fincan kahve] ısmarlayarak projeye destek olabilirsiniz(https://buymeacoff.ee/fenny).
-
-## ☕ Destekçiler
-Fiber, alan adı, gitbook, netlify, serverless yer sağlayıcısı giderleri ve benzeri şeyleri ödemek için bağışlarla yaşayan bir açık kaynaklı projedir. Eğer Fiber'e destek olmak isterseniz, ☕ [**buradan kahve ısmarlayabilirsiniz.**](https://buymeacoff.ee/fenny)
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Koda Katkı Sağlayanlar
-
-
-
-## ⚠️ Lisans
-
-Telif (c) 2019-günümüz [Fenny](https://github.com/fenny) ve [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber`, [MIT Lisansı](https://github.com/gofiber/fiber/blob/master/LICENSE) altında özgür ve açık kaynaklı bir yazılımdır. Resmi logosu [Vic Shóstak](https://github.com/koddr) tarafında tasarlanmıştır ve [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) lisansı altında dağıtımı yapılır. (CC BY-SA 4.0 International).
-
-**3. Parti yazılım lisanları**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber, Go için en hızlı HTTP motoru olan Fasthttp üzerine inşa edilmiş, Express den ilham alan bir web çatısıdır. Sıfır bellek ayırma ve performans göz önünde bulundurularak hızlı geliştirme için işleri kolaylaştırmak üzere tasarlandı.
+
+
+## ⚡️ Hızlı Başlangıç
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Merhaba dünya!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ Kurulum
+
+İlk önce, Go yu [indirip](https://golang.org/dl/) kuruyoruz. `1.11` veya daha yeni sürüm gereklidir.
+
+[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) komutunu kullanarak kurulumu tamamlıyoruz:
+
+```bash
+go get -u github.com/gofiber/fiber/...
+```
+
+## 🤖 Performans Ölçümleri
+
+Bu testler [TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks) ve [Go Web](https://github.com/smallnest/go-web-framework-benchmark) ile koşuldu. Bütün sonuçları görmek için lütfen [Wiki](https://docs.gofiber.io/benchmarks) sayfasını ziyaret ediniz.
+
+
+
+
+
+
+## 🎯 Özellikler
+
+- Güçlü [rotalar](https://docs.gofiber.io/routing)
+- [Statik dosya](https://docs.gofiber.io/application#static) yönetimi
+- Olağanüstü [performans](https://docs.gofiber.io/benchmarks)
+- [Düşük bellek](https://docs.gofiber.io/benchmarks) tüketimi
+- [API uç noktaları](https://docs.gofiber.io/context)
+- Ara katman & [Sonraki](https://docs.gofiber.io/context#next) desteği
+- [Hızlı](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) sunucu taraflı programlama
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- Ve daha fazlası, [Fiber ı keşfet](https://docs.gofiber.io/)
+
+## 💡 Felsefe
+
+[Node.js](https://nodejs.org/en/about/) den [Go](https://golang.org/doc/) ya geçen yeni gopher lar kendi web uygulamalarını ve mikroservislerini yazmaya başlamadan önce dili öğrenmek ile uğraşıyorlar. Fiber, bir **web çatısı** olarak, **minimalizm** ve **UNIX yolu**nu izlemek fikri ile oluşturuldu. Böylece yeni gopher lar sıcak ve güvenilir bir hoşgeldin ile Go dünyasına giriş yapabilirler.
+
+Fiber internet üzerinde en popüler olan Express web çatısından **esinlenmiştir**. Biz Express in **kolaylığını** ve Go nun **ham performansını** birleştirdik. Daha önce Node.js üzerinde (Express veya benzerini kullanarak) bir web uygulaması geliştirdiyseniz, pek çok metod ve prensip size **çok tanıdık** gelecektir.
+
+## 👀 Örnekler
+
+Aşağıda yaygın örneklerden bazıları listelenmiştir. Daha fazla kod örneği görmek için, lütfen [Kod deposunu](https://github.com/gofiber/recipes) veya [API dökümantasyonunu](https://docs.gofiber.io) ziyaret ediniz.
+
+### Rotalama
+
+📖 [Rotalama](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john http methodunu çağır
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john http methodunu çağır
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register http methodunu çağır
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Statik Dosyaları Servis Etmek
+
+📖 [Statik](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Ara Katman ve İleri(Middleware & Next)
+
+📖 [Ara Katman](https://docs.gofiber.io/routing#middleware)
+📖 [İleri](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Bütün rotalarla eşleş
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // /api ile başlayan tüm rotalarla eşleş
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register http methodunu çağır
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Daha fazla kod örneği göster
+
+### Şablon Motorları
+
+📖 [Ayarlar](https://docs.gofiber.io/application#settings)
+📖 [Tasvir et(Render)](https://docs.gofiber.io/context#render)
+📖 [Şablonlar](https://docs.gofiber.io/middleware#template)
+
+Fiber varsayılan olarak [Go şablon motoru](https://golang.org/pkg/html/template/)'nu destekler.
+
+Eğer başka bir şablon motoru kullanmak isterseniz, mesela [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) yada [pug](https://github.com/Joker/jade) gibi, bizim [Şablon Ara Katmanımızı](https://docs.gofiber.io/middleware#template) da kullanabilirsiniz.
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ //Uygulamayı başlatmadan önce şablon motorunu kurabilirsiniz:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // YADA uygulamayı başlattıktan sonra uygun yere koyabilirsiniz:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // Ve şimdi, bu şekide `./views/home.tmpl` şablonunu çağırabilirsiniz:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Rotaları Zincirlere Gruplama
+
+📖 [Grup](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Kök API rotası
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 rotası
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 rotası
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Ara Katman Günlükcüsü(Logger)
+
+📖 [Günlükcü](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Tercihe bağlı günlük ayarları
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Günlükcüyü ayarla
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Farklı Merkezler Arası Kaynak Paylaşımı (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Varsayılan ayarlarla CORS
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+`Origin` başlığı içinde herhangı bir alan adı kullanarak CORS'u kontrol et:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Özelleştirilebilir 404 yanıtları
+
+📖 [HTTP Methodlari](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Herhangi bir şeyle eşleşen son ara katman
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Yanıtları
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Yükseltmesi
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Ara Katman'dan Kurtarma
+
+📖 [Kurtar](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Özelleştirilebilir kurtarma ayarı
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Özelleştrilebilir günlükleme
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 Medya
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 Destek
+
+Eğer **teşekkür etmek** ve/veya `Fiber`'in aktif geliştirilmesini desteklemek istiyorsanız:
+
+1. Projeye [GitHub Yıldızı](https://github.com/gofiber/fiber/stargazers) verin.
+2. [Twitter hesabınızdan](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber) proje hakkında tweet atın.
+3. [Medium](https://medium.com/), [Dev.to](https://dev.to/) veya kişisel blog üzerinden bir inceleme veya eğitici yazı yazın.
+4. API dökümantasyonunu çevirerek destek olabilirsiniz [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Projeye [bir fincan kahve] ısmarlayarak projeye destek olabilirsiniz(https://buymeacoff.ee/fenny).
+
+## ☕ Destekçiler
+Fiber, alan adı, gitbook, netlify, serverless yer sağlayıcısı giderleri ve benzeri şeyleri ödemek için bağışlarla yaşayan bir açık kaynaklı projedir. Eğer Fiber'e destek olmak isterseniz, ☕ [**buradan kahve ısmarlayabilirsiniz.**](https://buymeacoff.ee/fenny)
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Koda Katkı Sağlayanlar
+
+
+
+## ⚠️ Lisans
+
+Telif (c) 2019-günümüz [Fenny](https://github.com/fenny) ve [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber`, [MIT Lisansı](https://github.com/gofiber/fiber/blob/master/LICENSE) altında özgür ve açık kaynaklı bir yazılımdır. Resmi logosu [Vic Shóstak](https://github.com/koddr) tarafında tasarlanmıştır ve [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) lisansı altında dağıtımı yapılır. (CC BY-SA 4.0 International).
+
+**3. Parti yazılım lisanları**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/README_zh-CN.md b/.github/README_zh-CN.md
index 87ebbd4a..a2a8c158 100644
--- a/.github/README_zh-CN.md
+++ b/.github/README_zh-CN.md
@@ -1,555 +1,555 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Fiber是一个基于Express的 Web框架,建立在Go语言写的 最快的FasthttpHTTP引擎的基础上。皆在简化 零内存分配和提高性能,以便快速开发。
-
-
-## ⚡️ 快速入门
-
-```go
-package main
-
-import "github.com/gofiber/fiber"
-
-func main() {
- app := fiber.New()
-
- app.Get("/", func(c *fiber.Ctx) {
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-## ⚙️ 安装
-
-首先, [下载](https://golang.org/dl/)并安装Go。 `1.11`或更高。
-
-使用[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them)命令完成安装:
-
-```bash
-export GO111MODULE=on
-export GOPROXY=https://goproxy.cn
-
-go get -u github.com/gofiber/fiber
-```
-
-## 🤖 性能
-
-这些测试由[TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks)和[Go Web执行](https://github.com/smallnest/go-web-framework-benchmark) 。如果要查看所有结果,请访问我们的[Wiki](https://docs.gofiber.io/benchmarks) 。
-
-
-
-
-
-
-## 🎯 特点
-
-- 强大的[路由](https://docs.gofiber.io/routing)
-- [静态文件](https://docs.gofiber.io/application#static)服务
-- 极限[表现](https://docs.gofiber.io/benchmarks)
-- [内存占用低](https://docs.gofiber.io/benchmarks)
-- Express [API端点](https://docs.gofiber.io/context)
-- 中间件和[Next](https://docs.gofiber.io/context#next)支持
-- [快速的](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)服务器端编程
-- [Template engines](https://docs.gofiber.io/middleware#template)
-- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
-- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
-- Available in [12 languages](https://docs.gofiber.io/)
-- 以及更多[文档](https://docs.gofiber.io/)
-
-## 💡 哲学
-
-从[Node.js](https://nodejs.org/en/about/)切换到[Go的](https://golang.org/doc/)新gopher在开始构建Web应用程序或微服务之前正在应对学习过程。 Fiber作为一个**Web框架** ,是按照**极简主义**的思想并遵循**UNIX方式创建的**,因此新的gopher可以以热烈和可信赖的欢迎**方式**迅速进入Go的世界。
-
-Fiber **受** Internet上最流行的Web框架Expressjs的**启发** 。我们结合了Express的**易用**性和Go的**原始性能** 。如果您曾经在Node.js上实现过Web应用程序(*使用Express.js或类似工具*),那么许多方法和原理对您来说似乎**非常易懂**。
-
-## 👀 示例
-
-下面列出了一些常见示例。如果您想查看更多代码示例,请访问我们的[Recipes存储库](https://github.com/gofiber/recipes)或访问我们的[API文档](https://docs.gofiber.io) 。
-
-### Routing
-
-📖 [Routing](https://docs.gofiber.io/#basic-routing)
-
-
-```go
-func main() {
- app := fiber.New()
-
- // GET /john
- app.Get("/:name", func(c *fiber.Ctx) {
- fmt.Printf("Hello %s!", c.Params("name"))
- // => Hello john!
- })
-
- // GET /john
- app.Get("/:name/:age?", func(c *fiber.Ctx) {
- fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
- // => Name: john, Age:
- })
-
- // GET /api/register
- app.Get("/api/*", func(c *fiber.Ctx) {
- fmt.Printf("/api/%s", c.Params("*"))
- // => /api/register
- })
-
- app.Listen(3000)
-}
-```
-
-### Serve static files
-
-📖 [Static](https://docs.gofiber.io/application#static)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/", "/public")
- // => http://localhost:3000/js/script.js
- // => http://localhost:3000/css/style.css
-
- app.Static("/prefix", "/public")
- // => http://localhost:3000/prefix/js/script.js
- // => http://localhost:3000/prefix/css/style.css
-
- app.Static("*", "/public/index.html")
- // => http://localhost:3000/any/path/shows/index/html
-
- app.Listen(3000)
-}
-```
-
-### Middleware & Next
-
-📖 [Middleware](https://docs.gofiber.io/routing#middleware)
-📖 [Next](https://docs.gofiber.io/context#next)
-
-```go
-func main() {
- app := fiber.New()
-
- // Match any route
- app.Use(func(c *fiber.Ctx) {
- fmt.Println("First middleware")
- c.Next()
- })
-
- // Match all routes starting with /api
- app.Use("/api", func(c *fiber.Ctx) {
- fmt.Println("Second middleware")
- c.Next()
- })
-
- // GET /api/register
- app.Get("/api/list", func(c *fiber.Ctx) {
- fmt.Println("Last middleware")
- c.Send("Hello, World!")
- })
-
- app.Listen(3000)
-}
-```
-
-
- 📚 Show more code examples
-
-### Template engines
-
-📖 [Settings](https://docs.gofiber.io/application#settings)
-📖 [Render](https://docs.gofiber.io/context#render)
-📖 [Template](https://docs.gofiber.io/middleware#template)
-
-Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
-
-But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
-
-You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/template"
-)
-
-func main() {
- // You can setup template engine before initiation app:
- app := fiber.New(&fiber.Settings{
- TemplateEngine: template.Mustache(),
- TemplateFolder: "./views",
- TemplateExtension: ".tmpl",
- })
-
- // OR after initiation app at any convenient location:
- app.Settings.TemplateEngine = template.Mustache()
- app.Settings.TemplateFolder = "./views"
- app.Settings.TemplateExtension = ".tmpl"
-
- // And now, you can call template `./views/home.tmpl` like this:
- app.Get("/", func(c *fiber.Ctx) {
- c.Render("home", fiber.Map{
- "title": "Homepage",
- "year": 1999,
- })
- })
-
- // ...
-}
-```
-
-### Grouping routes into chains
-
-📖 [Group](https://docs.gofiber.io/application#group)
-
-```go
-func main() {
- app := fiber.New()
-
- // Root API route
- api := app.Group("/api", cors()) // /api
-
- // API v1 routes
- v1 := api.Group("/v1", mysql()) // /api/v1
- v1.Get("/list", handler) // /api/v1/list
- v1.Get("/user", handler) // /api/v1/user
-
- // API v2 routes
- v2 := api.Group("/v2", mongodb()) // /api/v2
- v2.Get("/list", handler) // /api/v2/list
- v2.Get("/user", handler) // /api/v2/user
-
- // ...
-}
-```
-
-### Middleware logger
-
-📖 [Logger](https://docs.gofiber.io/middleware#logger)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/logger"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional logger config
- config := logger.Config{
- Format: "${time} - ${method} ${path}\n",
- TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
- }
-
- // Logger with config
- app.Use(logger.New(config))
-
- app.Listen(3000)
-}
-```
-
-### Cross-Origin Resource Sharing (CORS)
-
-📖 [CORS](https://docs.gofiber.io/middleware#cors)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/cors"
-)
-
-func main() {
- app := fiber.New()
-
- // CORS with default config
- app.Use(cors.New())
-
- app.Listen(3000)
-}
-```
-
-Check CORS by passing any domain in `Origin` header:
-
-```bash
-curl -H "Origin: http://example.com" --verbose http://localhost:3000
-```
-
-### Custom 404 response
-
-📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
-
-```go
-func main() {
- app := fiber.New()
-
- app.Static("/public")
-
- app.Get("/demo", func(c *fiber.Ctx) {
- c.Send("This is a demo!")
- })
-
- app.Post("/register", func(c *fiber.Ctx) {
- c.Send("Welcome!")
- })
-
- // Last middleware to match anything
- app.Use(func(c *fiber.Ctx) {
- c.SendStatus(404)
- // => 404 "Not Found"
- })
-
- app.Listen(3000)
-}
-```
-
-### JSON Response
-
-📖 [JSON](https://docs.gofiber.io/context#json)
-
-```go
-type User struct {
- Name string `json:"name"`
- Age int `json:"age"`
-}
-
-func main() {
- app := fiber.New()
-
- app.Get("/user", func(c *fiber.Ctx) {
- c.JSON(&User{"John", 20})
- // => {"name":"John", "age":20}
- })
-
- app.Get("/json", func(c *fiber.Ctx) {
- c.JSON(fiber.Map{
- "success": true,
- "message": "Hi John!",
- })
- // => {"success":true, "message":"Hi John!"}
- })
-
- app.Listen(3000)
-}
-```
-
-### WebSocket Upgrade
-
-📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/websocket"
-)
-
-func main() {
- app := fiber.New()
-
- app.Get("/ws", websocket.New(func(c *websocket.Conn) {
- for {
- mt, msg, err := c.ReadMessage()
- if err != nil {
- log.Println("read:", err)
- break
- }
- log.Printf("recv: %s", msg)
- err = c.WriteMessage(mt, msg)
- if err != nil {
- log.Println("write:", err)
- break
- }
- }
- }))
-
- app.Listen(3000)
- // ws://localhost:3000/ws
-}
-```
-
-### Recover middleware
-
-📖 [Recover](https://docs.gofiber.io/middleware#recover)
-
-```go
-import (
- "github.com/gofiber/fiber"
- "github.com/gofiber/recover"
-)
-
-func main() {
- app := fiber.New()
-
- // Optional recover config
- config := recover.Config{
- Handler: func(c *fiber.Ctx, err error) {
- c.SendString(err.Error())
- c.SendStatus(500)
- },
- }
-
- // Logger with custom config
- app.Use(recover.New(config))
-
- app.Listen(3000)
-}
-```
-
-
-## 🧬 Official Middlewares
-
-For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
-
-- [gofiber/compression](https://github.com/gofiber/compression)
-- [gofiber/basicauth](https://github.com/gofiber/basicauth)
-- [gofiber/requestid](https://github.com/gofiber/requestid)
-- [gofiber/websocket](https://github.com/gofiber/websocket)
-- [gofiber/keyauth](https://github.com/gofiber/keyauth)
-- [gofiber/rewrite](https://github.com/gofiber/rewrite)
-- [gofiber/recover](https://github.com/gofiber/recover)
-- [gofiber/limiter](https://github.com/gofiber/limiter)
-- [gofiber/session](https://github.com/gofiber/session)
-- [gofiber/adaptor](https://github.com/gofiber/adaptor)
-- [gofiber/logger](https://github.com/gofiber/logger)
-- [gofiber/helmet](https://github.com/gofiber/helmet)
-- [gofiber/embed](https://github.com/gofiber/embed)
-- [gofiber/pprof](https://github.com/gofiber/pprof)
-- [gofiber/cors](https://github.com/gofiber/cors)
-- [gofiber/csrf](https://github.com/gofiber/csrf)
-- [gofiber/jwt](https://github.com/gofiber/jwt)
-
-## 🌱 Third Party Middlewares
-
-This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
-- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
-- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
-- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
-- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
-- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
-- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
-- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
-
-## 💬 媒体
-
-- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
-- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
-- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
-- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
-- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
-- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
-- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
-- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
-- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
-
-## 👍 贡献
-
-如果您要说声**谢谢**或支持`Fiber`的积极发展:
-
-1. 将[GitHub Star](https://github.com/gofiber/fiber/stargazers)添加到项目中。
-2. [在Twitter上](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber)发布有关项目[的推文](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber)。
-3. 在[Medium](https://medium.com/),[Dev.to](https://dev.to/)或个人博客上写评论或教程。
-4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
-5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
-
-## ☕ Supporters
-
-Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny)
-
-| | User | Donation |
-| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
-|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
-|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
-|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
-|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
-|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
-|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
-|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
-|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
-|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
-|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
-|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
-|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
-|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
-
-## 💻 Code Contributors
-
-
-
-## ⚠️ License
-
-Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
-
-**Third-party library licenses**
-- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
-- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
-- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fiber是一个基于Express的 Web框架,建立在Go语言写的 最快的FasthttpHTTP引擎的基础上。皆在简化 零内存分配和提高性能,以便快速开发。
+
+
+## ⚡️ 快速入门
+
+```go
+package main
+
+import "github.com/gofiber/fiber"
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+## ⚙️ 安装
+
+首先, [下载](https://golang.org/dl/)并安装Go。 `1.11`或更高。
+
+使用[`go get`](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them)命令完成安装:
+
+```bash
+export GO111MODULE=on
+export GOPROXY=https://goproxy.cn
+
+go get -u github.com/gofiber/fiber
+```
+
+## 🤖 性能
+
+这些测试由[TechEmpower](https://github.com/TechEmpower/FrameworkBenchmarks)和[Go Web执行](https://github.com/smallnest/go-web-framework-benchmark) 。如果要查看所有结果,请访问我们的[Wiki](https://docs.gofiber.io/benchmarks) 。
+
+
+
+
+
+
+## 🎯 特点
+
+- 强大的[路由](https://docs.gofiber.io/routing)
+- [静态文件](https://docs.gofiber.io/application#static)服务
+- 极限[表现](https://docs.gofiber.io/benchmarks)
+- [内存占用低](https://docs.gofiber.io/benchmarks)
+- Express [API端点](https://docs.gofiber.io/context)
+- 中间件和[Next](https://docs.gofiber.io/context#next)支持
+- [快速的](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497)服务器端编程
+- [Template engines](https://docs.gofiber.io/middleware#template)
+- [WebSocket support](https://docs.gofiber.io/middleware#websocket)
+- [Rate Limiter](https://docs.gofiber.io/middleware#limiter)
+- Available in [12 languages](https://docs.gofiber.io/)
+- 以及更多[文档](https://docs.gofiber.io/)
+
+## 💡 哲学
+
+从[Node.js](https://nodejs.org/en/about/)切换到[Go的](https://golang.org/doc/)新gopher在开始构建Web应用程序或微服务之前正在应对学习过程。 Fiber作为一个**Web框架** ,是按照**极简主义**的思想并遵循**UNIX方式创建的**,因此新的gopher可以以热烈和可信赖的欢迎**方式**迅速进入Go的世界。
+
+Fiber **受** Internet上最流行的Web框架Expressjs的**启发** 。我们结合了Express的**易用**性和Go的**原始性能** 。如果您曾经在Node.js上实现过Web应用程序(*使用Express.js或类似工具*),那么许多方法和原理对您来说似乎**非常易懂**。
+
+## 👀 示例
+
+下面列出了一些常见示例。如果您想查看更多代码示例,请访问我们的[Recipes存储库](https://github.com/gofiber/recipes)或访问我们的[API文档](https://docs.gofiber.io) 。
+
+### Routing
+
+📖 [Routing](https://docs.gofiber.io/#basic-routing)
+
+
+```go
+func main() {
+ app := fiber.New()
+
+ // GET /john
+ app.Get("/:name", func(c *fiber.Ctx) {
+ fmt.Printf("Hello %s!", c.Params("name"))
+ // => Hello john!
+ })
+
+ // GET /john
+ app.Get("/:name/:age?", func(c *fiber.Ctx) {
+ fmt.Printf("Name: %s, Age: %s", c.Params("name"), c.Params("age"))
+ // => Name: john, Age:
+ })
+
+ // GET /api/register
+ app.Get("/api/*", func(c *fiber.Ctx) {
+ fmt.Printf("/api/%s", c.Params("*"))
+ // => /api/register
+ })
+
+ app.Listen(3000)
+}
+```
+
+### Serve static files
+
+📖 [Static](https://docs.gofiber.io/application#static)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/", "/public")
+ // => http://localhost:3000/js/script.js
+ // => http://localhost:3000/css/style.css
+
+ app.Static("/prefix", "/public")
+ // => http://localhost:3000/prefix/js/script.js
+ // => http://localhost:3000/prefix/css/style.css
+
+ app.Static("*", "/public/index.html")
+ // => http://localhost:3000/any/path/shows/index/html
+
+ app.Listen(3000)
+}
+```
+
+### Middleware & Next
+
+📖 [Middleware](https://docs.gofiber.io/routing#middleware)
+📖 [Next](https://docs.gofiber.io/context#next)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Match any route
+ app.Use(func(c *fiber.Ctx) {
+ fmt.Println("First middleware")
+ c.Next()
+ })
+
+ // Match all routes starting with /api
+ app.Use("/api", func(c *fiber.Ctx) {
+ fmt.Println("Second middleware")
+ c.Next()
+ })
+
+ // GET /api/register
+ app.Get("/api/list", func(c *fiber.Ctx) {
+ fmt.Println("Last middleware")
+ c.Send("Hello, World!")
+ })
+
+ app.Listen(3000)
+}
+```
+
+
+ 📚 Show more code examples
+
+### Template engines
+
+📖 [Settings](https://docs.gofiber.io/application#settings)
+📖 [Render](https://docs.gofiber.io/context#render)
+📖 [Template](https://docs.gofiber.io/middleware#template)
+
+Fiber supports the default [Go template engine](https://golang.org/pkg/html/template/)
+
+But if you want to use another template engine like [amber](https://github.com/eknkc/amber), [handlebars](https://github.com/aymerick/raymond), [mustache](https://github.com/cbroglie/mustache) or [pug](https://github.com/Joker/jade).
+
+You can use our [Template Middleware](https://docs.gofiber.io/middleware#template).
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/template"
+)
+
+func main() {
+ // You can setup template engine before initiation app:
+ app := fiber.New(&fiber.Settings{
+ TemplateEngine: template.Mustache(),
+ TemplateFolder: "./views",
+ TemplateExtension: ".tmpl",
+ })
+
+ // OR after initiation app at any convenient location:
+ app.Settings.TemplateEngine = template.Mustache()
+ app.Settings.TemplateFolder = "./views"
+ app.Settings.TemplateExtension = ".tmpl"
+
+ // And now, you can call template `./views/home.tmpl` like this:
+ app.Get("/", func(c *fiber.Ctx) {
+ c.Render("home", fiber.Map{
+ "title": "Homepage",
+ "year": 1999,
+ })
+ })
+
+ // ...
+}
+```
+
+### Grouping routes into chains
+
+📖 [Group](https://docs.gofiber.io/application#group)
+
+```go
+func main() {
+ app := fiber.New()
+
+ // Root API route
+ api := app.Group("/api", cors()) // /api
+
+ // API v1 routes
+ v1 := api.Group("/v1", mysql()) // /api/v1
+ v1.Get("/list", handler) // /api/v1/list
+ v1.Get("/user", handler) // /api/v1/user
+
+ // API v2 routes
+ v2 := api.Group("/v2", mongodb()) // /api/v2
+ v2.Get("/list", handler) // /api/v2/list
+ v2.Get("/user", handler) // /api/v2/user
+
+ // ...
+}
+```
+
+### Middleware logger
+
+📖 [Logger](https://docs.gofiber.io/middleware#logger)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/logger"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional logger config
+ config := logger.Config{
+ Format: "${time} - ${method} ${path}\n",
+ TimeFormat: "Mon, 2 Jan 2006 15:04:05 MST",
+ }
+
+ // Logger with config
+ app.Use(logger.New(config))
+
+ app.Listen(3000)
+}
+```
+
+### Cross-Origin Resource Sharing (CORS)
+
+📖 [CORS](https://docs.gofiber.io/middleware#cors)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/cors"
+)
+
+func main() {
+ app := fiber.New()
+
+ // CORS with default config
+ app.Use(cors.New())
+
+ app.Listen(3000)
+}
+```
+
+Check CORS by passing any domain in `Origin` header:
+
+```bash
+curl -H "Origin: http://example.com" --verbose http://localhost:3000
+```
+
+### Custom 404 response
+
+📖 [HTTP Methods](https://docs.gofiber.io/application#http-methods)
+
+```go
+func main() {
+ app := fiber.New()
+
+ app.Static("/public")
+
+ app.Get("/demo", func(c *fiber.Ctx) {
+ c.Send("This is a demo!")
+ })
+
+ app.Post("/register", func(c *fiber.Ctx) {
+ c.Send("Welcome!")
+ })
+
+ // Last middleware to match anything
+ app.Use(func(c *fiber.Ctx) {
+ c.SendStatus(404)
+ // => 404 "Not Found"
+ })
+
+ app.Listen(3000)
+}
+```
+
+### JSON Response
+
+📖 [JSON](https://docs.gofiber.io/context#json)
+
+```go
+type User struct {
+ Name string `json:"name"`
+ Age int `json:"age"`
+}
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/user", func(c *fiber.Ctx) {
+ c.JSON(&User{"John", 20})
+ // => {"name":"John", "age":20}
+ })
+
+ app.Get("/json", func(c *fiber.Ctx) {
+ c.JSON(fiber.Map{
+ "success": true,
+ "message": "Hi John!",
+ })
+ // => {"success":true, "message":"Hi John!"}
+ })
+
+ app.Listen(3000)
+}
+```
+
+### WebSocket Upgrade
+
+📖 [Websocket](https://docs.gofiber.io/middleware#websocket)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/websocket"
+)
+
+func main() {
+ app := fiber.New()
+
+ app.Get("/ws", websocket.New(func(c *websocket.Conn) {
+ for {
+ mt, msg, err := c.ReadMessage()
+ if err != nil {
+ log.Println("read:", err)
+ break
+ }
+ log.Printf("recv: %s", msg)
+ err = c.WriteMessage(mt, msg)
+ if err != nil {
+ log.Println("write:", err)
+ break
+ }
+ }
+ }))
+
+ app.Listen(3000)
+ // ws://localhost:3000/ws
+}
+```
+
+### Recover middleware
+
+📖 [Recover](https://docs.gofiber.io/middleware#recover)
+
+```go
+import (
+ "github.com/gofiber/fiber"
+ "github.com/gofiber/recover"
+)
+
+func main() {
+ app := fiber.New()
+
+ // Optional recover config
+ config := recover.Config{
+ Handler: func(c *fiber.Ctx, err error) {
+ c.SendString(err.Error())
+ c.SendStatus(500)
+ },
+ }
+
+ // Logger with custom config
+ app.Use(recover.New(config))
+
+ app.Listen(3000)
+}
+```
+
+
+## 🧬 Official Middlewares
+
+For an more _maintainable_ middleware _ecosystem_, we've put official [middlewares](https://docs.gofiber.io/middleware) into separate repositories:
+
+- [gofiber/compression](https://github.com/gofiber/compression)
+- [gofiber/basicauth](https://github.com/gofiber/basicauth)
+- [gofiber/requestid](https://github.com/gofiber/requestid)
+- [gofiber/websocket](https://github.com/gofiber/websocket)
+- [gofiber/keyauth](https://github.com/gofiber/keyauth)
+- [gofiber/rewrite](https://github.com/gofiber/rewrite)
+- [gofiber/recover](https://github.com/gofiber/recover)
+- [gofiber/limiter](https://github.com/gofiber/limiter)
+- [gofiber/session](https://github.com/gofiber/session)
+- [gofiber/adaptor](https://github.com/gofiber/adaptor)
+- [gofiber/logger](https://github.com/gofiber/logger)
+- [gofiber/helmet](https://github.com/gofiber/helmet)
+- [gofiber/embed](https://github.com/gofiber/embed)
+- [gofiber/pprof](https://github.com/gofiber/pprof)
+- [gofiber/cors](https://github.com/gofiber/cors)
+- [gofiber/csrf](https://github.com/gofiber/csrf)
+- [gofiber/jwt](https://github.com/gofiber/jwt)
+
+## 🌱 Third Party Middlewares
+
+This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!
+- [arsmn/fiber-swagger](https://github.com/arsmn/fiber-swagger)
+- [arsmn/fiber-casbin](https://github.com/arsmn/fiber-casbin)
+- [arsmn/fiber-introspect](https://github.com/arsmn/fiber-introspect)
+- [shareed2k/fiber_tracing](https://github.com/shareed2k/fiber_tracing)
+- [shareed2k/fiber_limiter](https://github.com/shareed2k/fiber_limiter)
+- [thomasvvugt/fiber-boilerplate](https://github.com/thomasvvugt/fiber-boilerplate)
+- [arsmn/gqlgen](https://github.com/arsmn/gqlgen)
+
+## 💬 媒体
+
+- [Welcome to Fiber — an Express.js styled web framework written in Go with ❤️](https://dev.to/koddr/welcome-to-fiber-an-express-js-styled-fastest-web-framework-written-with-on-golang-497) — _03 Feb 2020_
+- [Fiber released v1.7! 🎉 What's new and is it still fast, flexible and friendly?](https://dev.to/koddr/fiber-v2-is-out-now-what-s-new-and-is-he-still-fast-flexible-and-friendly-3ipf) — _21 Feb 2020_
+- [🚀 Fiber v1.8. What's new, updated and re-thinked?](https://dev.to/koddr/fiber-v1-8-what-s-new-updated-and-re-thinked-339h) — _03 Mar 2020_
+- [Is switching from Express to Fiber worth it? 🤔](https://dev.to/koddr/are-sure-what-your-lovely-web-framework-running-so-fast-2jl1) — _01 Apr 2020_
+- [Creating Fast APIs In Go Using Fiber](https://dev.to/jozsefsallai/creating-fast-apis-in-go-using-fiber-59m9) — _07 Apr 2020_
+- [Building a Basic REST API in Go using Fiber](https://tutorialedge.net/golang/basic-rest-api-go-fiber/) - _23 Apr 2020_
+- [📺 Building a REST API using GORM and Fiber](https://youtu.be/Iq2qT0fRhAA) - _25 Apr 2020_
+- [🌎 Create a travel list app with Go, Fiber, Angular, MongoDB and Google Cloud Secret Manager](https://blog.yongweilun.me/create-a-travel-list-app-with-go-fiber-angular-mongodb-and-google-cloud-secret-manager-ck9fgxy0p061pcss1xt1ubu8t) - _25 Apr 2020_
+- [Fiber v1.9.6 🔥 How to improve performance by 817% and stay fast, flexible and friendly?](https://dev.to/koddr/fiber-v1-9-5-how-to-improve-performance-by-817-and-stay-fast-flexible-and-friendly-2dp6) - _12 May 2020_
+
+## 👍 贡献
+
+如果您要说声**谢谢**或支持`Fiber`的积极发展:
+
+1. 将[GitHub Star](https://github.com/gofiber/fiber/stargazers)添加到项目中。
+2. [在Twitter上](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber)发布有关项目[的推文](https://twitter.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber)。
+3. 在[Medium](https://medium.com/),[Dev.to](https://dev.to/)或个人博客上写评论或教程。
+4. Help us to translate our API Documentation via [Crowdin](https://crowdin.com/project/gofiber) [](https://crowdin.com/project/gofiber)
+5. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).
+
+## ☕ Supporters
+
+Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny)
+
+| | User | Donation |
+| :---------------------------------------------------------- | :---------------------------------------------- | :------- |
+|  | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
+|  | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
+|  | [@candidosales](https://github.com/candidosales)| ☕ x 5 |
+|  | [@bihe](https://github.com/bihe) | ☕ x 3 |
+|  | [@justdave](https://github.com/justdave) | ☕ x 3 |
+|  | [@koddr](https://github.com/koddr) | ☕ x 1 |
+|  | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
+|  | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
+|  | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
+|  | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
+|  | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
+|  | [@marvinjwendt](https://github.com/thomasvvugt) | ☕ x 1 |
+|  | [@toishy](https://github.com/toishy) | ☕ x 1 |
+
+## 💻 Code Contributors
+
+
+
+## ⚠️ License
+
+Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).
+
+**Third-party library licenses**
+- [FastHTTP](https://github.com/valyala/fasthttp/blob/master/LICENSE)
+- [Schema](https://github.com/gorilla/schema/blob/master/LICENSE)
+- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 5abdd38d..52a003af 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -22,7 +22,7 @@ jobs:
with:
tool: 'go'
output-file-path: output.txt
- github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
+ github-token: ${{ secrets.BENCHMARK_TOKEN }}
fail-on-alert: true
comment-on-alert: true
auto-push: true
\ No newline at end of file
diff --git a/app.go b/app.go
index 40d52a37..122d2e8d 100644
--- a/app.go
+++ b/app.go
@@ -186,6 +186,16 @@ func (app *App) Use(args ...interface{}) *App {
return app
}
+// Add : https://fiber.wiki/application#http-methods
+func (app *App) Add(method, path string, handlers ...func(*Ctx)) *App {
+ method = strings.ToUpper(method)
+ if methodINT[method] == 0 && method != "GET" {
+ log.Fatalf("Add: Invalid HTTP method %s", method)
+ }
+ app.registerMethod(method, path, handlers...)
+ return app
+}
+
// Connect : https://fiber.wiki/application#http-methods
func (app *App) Connect(path string, handlers ...func(*Ctx)) *App {
app.registerMethod(MethodConnect, path, handlers...)
@@ -285,6 +295,16 @@ func (grp *Group) Use(args ...interface{}) *Group {
return grp
}
+// Add : https://fiber.wiki/application#http-methods
+func (grp *Group) Add(method, path string, handlers ...func(*Ctx)) *Group {
+ method = strings.ToUpper(method)
+ if methodINT[method] == 0 && method != "GET" {
+ log.Fatalf("Add: Invalid HTTP method %s", method)
+ }
+ grp.app.registerMethod(method, getGroupPath(grp.prefix, path), handlers...)
+ return grp
+}
+
// Connect : https://fiber.wiki/application#http-methods
func (grp *Group) Connect(path string, handlers ...func(*Ctx)) *Group {
grp.app.registerMethod(MethodConnect, getGroupPath(grp.prefix, path), handlers...)
diff --git a/app_bench_test.go b/app_bench_test.go
index 37dcd9d1..bceb9a66 100644
--- a/app_bench_test.go
+++ b/app_bench_test.go
@@ -1,7 +1,7 @@
-// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
-// 🤖 Github Repository: https://github.com/gofiber/fiber
-// 📌 API Documentation: https://docs.gofiber.io
-
-package fiber
-
-// // go test -v ./... -run=^$ -bench=Benchmark_Ctx_Acce -benchmem -count=3
+// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
+// 🤖 Github Repository: https://github.com/gofiber/fiber
+// 📌 API Documentation: https://docs.gofiber.io
+
+package fiber
+
+// // go test -v ./... -run=^$ -bench=Benchmark_Ctx_Acce -benchmem -count=3
diff --git a/app_test.go b/app_test.go
index ba34f962..80c7f085 100644
--- a/app_test.go
+++ b/app_test.go
@@ -63,6 +63,24 @@ func Test_App_Use_Params(t *testing.T) {
assertEqual(t, nil, err, "app.Test(req)")
assertEqual(t, 200, resp.StatusCode, "Status code")
}
+
+func Test_App_Use_Params_Group(t *testing.T) {
+ app := New()
+
+ group := app.Group("/prefix/:param/*")
+ group.Use("/", func(c *Ctx) {
+ c.Next()
+ })
+ group.Get("/test", func(c *Ctx) {
+ assertEqual(t, "john", c.Params("param"))
+ assertEqual(t, "doe", c.Params("*"))
+ })
+
+ resp, err := app.Test(httptest.NewRequest("GET", "/prefix/john/doe/test", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+
func Test_App_Order(t *testing.T) {
app := New()
@@ -241,16 +259,18 @@ func Test_App_Listen(t *testing.T) {
DisableStartupMessage: true,
})
go func() {
- time.Sleep(1 * time.Millisecond)
+ time.Sleep(1000 * time.Millisecond)
assertEqual(t, nil, app.Shutdown())
}()
- assertEqual(t, nil, app.Listen(3002))
+
+ assertEqual(t, nil, app.Listen(4003))
go func() {
- time.Sleep(500 * time.Millisecond)
+ time.Sleep(1000 * time.Millisecond)
assertEqual(t, nil, app.Shutdown())
}()
- assertEqual(t, nil, app.Listen("3003"))
+
+ assertEqual(t, nil, app.Listen("4010"))
}
func Test_App_Serve(t *testing.T) {
@@ -258,11 +278,11 @@ func Test_App_Serve(t *testing.T) {
DisableStartupMessage: true,
Prefork: true,
})
- ln, err := net.Listen("tcp4", ":3004")
+ ln, err := net.Listen("tcp4", ":4020")
assertEqual(t, nil, err)
go func() {
- time.Sleep(500 * time.Millisecond)
+ time.Sleep(1000 * time.Millisecond)
assertEqual(t, nil, app.Shutdown())
}()
diff --git a/ctx.go b/ctx.go
index 81c69e64..38d85704 100644
--- a/ctx.go
+++ b/ctx.go
@@ -24,7 +24,7 @@ import (
"time"
schema "github.com/gorilla/schema"
- "github.com/valyala/bytebufferpool"
+ bytebufferpool "github.com/valyala/bytebufferpool"
fasthttp "github.com/valyala/fasthttp"
)
diff --git a/ctx_bench_test.go b/ctx_bench_test.go
index 8aaceccc..815e037a 100644
--- a/ctx_bench_test.go
+++ b/ctx_bench_test.go
@@ -13,7 +13,7 @@ import (
"github.com/valyala/fasthttp"
)
-// go test -v ./... -run=^$ -bench=Benchmark_Ctx_Params -benchmem -count=3
+// go test -v ./... -run=^$ -bench=Benchmark_Ctx -benchmem -count=3
func Benchmark_Ctx_Accepts(b *testing.B) {
c := AcquireCtx(&fasthttp.RequestCtx{})
diff --git a/ctx_test.go b/ctx_test.go
index e11f9ed8..5958326c 100644
--- a/ctx_test.go
+++ b/ctx_test.go
@@ -1,987 +1,987 @@
-// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
-// 🤖 Github Repository: https://github.com/gofiber/fiber
-// 📌 API Documentation: https://docs.gofiber.io
-
-package fiber
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "mime/multipart"
- "net/http"
- "net/http/httptest"
- "net/url"
- "os"
- "strconv"
- "strings"
- "testing"
- "time"
-)
-
-func Test_Ctx_Accepts(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "", c.Accepts(""))
- assertEqual(t, ".xml", c.Accepts(".xml"))
- assertEqual(t, "", c.Accepts(".john"))
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_AcceptsCharsets(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "utf-8", c.AcceptsCharsets("utf-8"))
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("Accept-Charset", "utf-8, iso-8859-1;q=0.5")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_AcceptsEncodings(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "gzip", c.AcceptsEncodings("gzip"))
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("Accept-Encoding", "deflate, gzip;q=1.0, *;q=0.5")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_AcceptsLanguages(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "fr", c.AcceptsLanguages("fr"))
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("Accept-Language", "fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_BaseURL(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "http://google.com", c.BaseURL())
- })
-
- req := httptest.NewRequest("GET", "http://google.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Body(t *testing.T) {
- app := New()
-
- app.Post("/test", func(c *Ctx) {
- assertEqual(t, "john=doe", c.Body())
- })
-
- data := url.Values{}
- data.Set("john", "doe")
-
- req := httptest.NewRequest("POST", "/test", strings.NewReader(data.Encode()))
- req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
- req.Header.Add("Content-Length", strconv.Itoa(len(data.Encode())))
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_BodyParser(t *testing.T) {
- app := New()
-
- type Demo struct {
- Name string `json:"name" xml:"name" form:"name" query:"name"`
- }
- type Query struct {
- ID int
- Name string
- Hobby []string
- }
-
- app.Post("/test", func(c *Ctx) {
- d := new(Demo)
- assertEqual(t, nil, c.BodyParser(d))
- assertEqual(t, "john", d.Name)
- })
-
- app.Get("/query", func(c *Ctx) {
- d := new(Query)
- assertEqual(t, nil, c.BodyParser(d))
- assertEqual(t, 2, len(d.Hobby))
- })
-
- req := httptest.NewRequest("POST", "/test", bytes.NewBuffer([]byte(`{"name":"john"}`)))
- req.Header.Set("Content-Type", "application/json")
- req.Header.Set("Content-Length", strconv.Itoa(len([]byte(`{"name":"john"}`))))
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- req = httptest.NewRequest("GET", "/query?id=1&name=tom&hobby=basketball&hobby=football", nil)
-
- resp, err = app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Cookies(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "doe", c.Cookies("john"))
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.AddCookie(&http.Cookie{Name: "john", Value: "doe"})
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_FormFile(t *testing.T) {
- app := New()
-
- app.Post("/test", func(c *Ctx) {
- fh, err := c.FormFile("file")
- assertEqual(t, nil, err)
- assertEqual(t, "test", fh.Filename)
-
- f, err := fh.Open()
- assertEqual(t, nil, err)
-
- b := new(bytes.Buffer)
- _, err = io.Copy(b, f)
- assertEqual(t, nil, err)
-
- f.Close()
- assertEqual(t, "hello world", b.String())
- })
-
- body := &bytes.Buffer{}
- writer := multipart.NewWriter(body)
-
- ioWriter, err := writer.CreateFormFile("file", "test")
- assertEqual(t, nil, err)
-
- _, err = ioWriter.Write([]byte("hello world"))
- assertEqual(t, nil, err)
-
- writer.Close()
-
- req := httptest.NewRequest("POST", "/test", body)
- req.Header.Set("Content-Type", writer.FormDataContentType())
- req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_FormValue(t *testing.T) {
- app := New()
-
- app.Post("/test", func(c *Ctx) {
- assertEqual(t, "john", c.FormValue("name"))
- })
-
- body := &bytes.Buffer{}
- writer := multipart.NewWriter(body)
-
- assertEqual(t, nil, writer.WriteField("name", "john"))
-
- writer.Close()
- req := httptest.NewRequest("POST", "/test", body)
- req.Header.Set("Content-Type", fmt.Sprintf("multipart/form-data; boundary=%s", writer.Boundary()))
- req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Fresh(t *testing.T) {
- app := New()
- // TODO
- app.Get("/test", func(c *Ctx) {
- c.Fresh()
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Get(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "utf-8, iso-8859-1;q=0.5", c.Get("Accept-Charset"))
- assertEqual(t, "Monster", c.Get("referrer"))
- })
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("Accept-Charset", "utf-8, iso-8859-1;q=0.5")
- req.Header.Set("Referer", "Monster")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Hostname(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "google.com", c.Hostname())
- })
-
- req := httptest.NewRequest("GET", "http://google.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_IP(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "0.0.0.0", c.IP())
- })
-
- req := httptest.NewRequest("GET", "http://google.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_IPs(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, []string{"0.0.0.0", "1.1.1.1"}, c.IPs())
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("X-Forwarded-For", "0.0.0.0, 1.1.1.1")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-
-// func Test_Ctx_Is(t *testing.T) {
-// app := New()
-// app.Get("/test", func(c *Ctx) {
-// c.Is(".json")
-// expect := true
-// result := c.Is("html")
-// if result != expect {
-// t.Fatalf(`%s: Expecting %v, got %v`, t.Name(), expect, result)
-// }
-// })
-// req := httptest.NewRequest("GET", "/test", nil)
-// req.Header.Set("Content-Type", "text/html")
-// resp, err := app.Test(req)
-// if err != nil {
-// t.Fatalf(`%s: %s`, t.Name(), err)
-// }
-// if resp.StatusCode != 200 {
-// t.Fatalf(`%s: StatusCode %v`, t.Name(), resp.StatusCode)
-// }
-// }
-func Test_Ctx_Locals(t *testing.T) {
- app := New()
-
- app.Use(func(c *Ctx) {
- c.Locals("john", "doe")
- c.Next()
- })
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "doe", c.Locals("john"))
- })
-
- resp, err := app.Test(httptest.NewRequest("GET", "/test", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Method(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "GET", c.Method())
- })
- app.Post("/test", func(c *Ctx) {
- assertEqual(t, "POST", c.Method())
- })
- app.Put("/test", func(c *Ctx) {
- assertEqual(t, "PUT", c.Method())
- })
-
- resp, err := app.Test(httptest.NewRequest("GET", "/test", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- resp, err = app.Test(httptest.NewRequest("POST", "/test", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- resp, err = app.Test(httptest.NewRequest("PUT", "/test", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_MultipartForm(t *testing.T) {
- app := New()
-
- app.Post("/test", func(c *Ctx) {
- result, err := c.MultipartForm()
- assertEqual(t, nil, err)
- assertEqual(t, "john", result.Value["name"][0])
- })
-
- body := &bytes.Buffer{}
- writer := multipart.NewWriter(body)
-
- assertEqual(t, nil, writer.WriteField("name", "john"))
-
- writer.Close()
- req := httptest.NewRequest("POST", "/test", body)
- req.Header.Set("Content-Type", fmt.Sprintf("multipart/form-data; boundary=%s", writer.Boundary()))
- req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_OriginalURL(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "http://google.com/test?search=demo", c.OriginalURL())
- })
-
- resp, err := app.Test(httptest.NewRequest("GET", "http://google.com/test?search=demo", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Params(t *testing.T) {
- app := New()
-
- app.Get("/test/:user", func(c *Ctx) {
- assertEqual(t, "john", c.Params("user"))
- })
-
- app.Get("/test2/*", func(c *Ctx) {
- assertEqual(t, "im/a/cookie", c.Params("*"))
- })
-
- app.Get("/test3/:optional?", func(c *Ctx) {
- assertEqual(t, "", c.Params("optional"))
- })
-
- resp, err := app.Test(httptest.NewRequest("GET", "/test/john", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- resp, err = app.Test(httptest.NewRequest("GET", "/test2/im/a/cookie", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- resp, err = app.Test(httptest.NewRequest("GET", "/test3", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Path(t *testing.T) {
- app := New()
-
- app.Get("/test/:user", func(c *Ctx) {
- assertEqual(t, "/test/john", c.Path())
- })
-
- req := httptest.NewRequest("GET", "/test/john", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Query(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "john", c.Query("search"))
- assertEqual(t, "20", c.Query("age"))
- })
- req := httptest.NewRequest("GET", "/test?search=john&age=20", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Range(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- result, err := c.Range(1000)
- assertEqual(t, nil, err)
- assertEqual(t, "bytes", result.Type)
- assertEqual(t, 500, result.Ranges[0].Start)
- assertEqual(t, 700, result.Ranges[0].End)
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("range", "bytes=500-700")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Route(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, "/test", c.Route().Path)
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_SaveFile(t *testing.T) {
- app := New()
-
- app.Post("/test", func(c *Ctx) {
- fh, err := c.FormFile("file")
- assertEqual(t, nil, err)
-
- tempFile, err := ioutil.TempFile(os.TempDir(), "test-")
- assertEqual(t, nil, err)
-
- defer os.Remove(tempFile.Name())
- err = c.SaveFile(fh, tempFile.Name())
- assertEqual(t, nil, err)
-
- bs, err := ioutil.ReadFile(tempFile.Name())
- assertEqual(t, nil, err)
- assertEqual(t, "hello world", string(bs))
- })
-
- body := &bytes.Buffer{}
- writer := multipart.NewWriter(body)
-
- ioWriter, err := writer.CreateFormFile("file", "test")
- assertEqual(t, nil, err)
-
- _, err = ioWriter.Write([]byte("hello world"))
- assertEqual(t, nil, err)
- writer.Close()
-
- req := httptest.NewRequest("POST", "/test", body)
- req.Header.Set("Content-Type", writer.FormDataContentType())
- req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Secure(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, false, c.Secure())
- })
-
- // app.Get("/secure", func(c *Ctx) {
- // assertEqual(t, true, c.Secure())
- // })
-
- req := httptest.NewRequest("GET", "/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- // req = httptest.NewRequest("GET", "https://google.com/secure", nil)
-
- // resp, err = app.Test(req)
- // assertEqual(t, nil, err, "app.Test(req)")
- // assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Stale(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Stale()
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-func Test_Ctx_Subdomains(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, []string{"john", "doe"}, c.Subdomains())
- })
-
- req := httptest.NewRequest("GET", "http://john.doe.google.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
-
-func Test_Ctx_Append(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Append("X-Test", "Hello")
- c.Append("X-Test", "World")
- c.Append("X-Test", "Hello", "World")
- })
-
- resp, err := app.Test(httptest.NewRequest("GET", "/test", nil))
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "Hello, World", resp.Header.Get("X-Test"))
-}
-func Test_Ctx_Attachment(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Attachment()
- c.Attachment("./static/img/logo.png")
- })
- req := httptest.NewRequest("GET", "/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, `attachment; filename="logo.png"`, resp.Header.Get("Content-Disposition"))
- assertEqual(t, "image/png", resp.Header.Get("Content-Type"))
-}
-
-func Test_Ctx_ClearCookie(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.ClearCookie()
- })
-
- app.Get("/test2", func(c *Ctx) {
- c.ClearCookie("john")
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.AddCookie(&http.Cookie{Name: "john", Value: "doe"})
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, true, strings.Contains(resp.Header.Get("Set-Cookie"), "expires="))
-
- req = httptest.NewRequest("GET", "/test2", nil)
- req.AddCookie(&http.Cookie{Name: "john", Value: "doe"})
-
- resp, err = app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, true, strings.Contains(resp.Header.Get("Set-Cookie"), "expires="))
-}
-func Test_Ctx_Cookie(t *testing.T) {
- app := New()
-
- expire := time.Now().Add(24 * time.Hour)
- var dst []byte
- dst = expire.In(time.UTC).AppendFormat(dst, time.RFC1123)
- httpdate := strings.Replace(string(dst), "UTC", "GMT", -1)
-
- app.Get("/test", func(c *Ctx) {
- cookie := new(Cookie)
- cookie.Name = "username"
- cookie.Value = "jon"
- cookie.Expires = expire
- c.Cookie(cookie)
- })
- req := httptest.NewRequest("GET", "/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- expireDate := "username=jon; expires=" + string(httpdate) + "; path=/"
- assertEqual(t, true, strings.Contains(resp.Header.Get("Set-Cookie"), expireDate))
-}
-func Test_Ctx_Download(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Download("ctx.go")
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
-
- f, err := os.Open("./ctx.go")
- assertEqual(t, nil, err)
-
- defer f.Close()
-
- expect, err := ioutil.ReadAll(f)
- assertEqual(t, nil, err)
- assertEqual(t, true, bytes.Equal(expect, body))
-}
-func Test_Ctx_Format(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Format("Hello, World!")
- })
-
- app.Get("/test2", func(c *Ctx) {
- c.Format([]byte("Hello, World!"))
- c.Format("Hello, World!")
- })
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
- req.Header.Set("Accept", "text/html")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, "Hello, World!
", string(body))
-
- req = httptest.NewRequest("GET", "http://example.com/test2", nil)
- req.Header.Set("Accept", "application/json")
-
- resp, err = app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- body, err = ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `"Hello, World!"`, string(body))
-}
-
-func Test_Ctx_JSON(t *testing.T) {
- app := New()
-
- type SomeStruct struct {
- Name string
- Age uint8
- }
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, nil, c.JSON(""))
-
- data := SomeStruct{
- Name: "Grame",
- Age: 20,
- }
- assertEqual(t, nil, c.JSON(data))
- })
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "application/json", resp.Header.Get("Content-Type"))
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `{"Name":"Grame","Age":20}`, string(body))
-}
-func Test_Ctx_JSONP(t *testing.T) {
- app := New()
-
- type SomeStruct struct {
- Name string
- Age uint8
- }
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, nil, c.JSONP(""))
-
- data := SomeStruct{
- Name: "Grame",
- Age: 20,
- }
- assertEqual(t, nil, c.JSONP(data, "john"))
- })
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "application/javascript", resp.Header.Get("Content-Type"))
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `john({"Name":"Grame","Age":20});`, string(body))
-}
-func Test_Ctx_Links(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Links(
- "http://api.example.com/users?page=2", "next",
- "http://api.example.com/users?page=5", "last",
- )
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, `; rel="next",; rel="last"`, resp.Header.Get("Link"))
-}
-func Test_Ctx_Location(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Location("http://example.com")
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "http://example.com", resp.Header.Get("Location"))
-}
-func Test_Ctx_Next(t *testing.T) {
- app := New()
-
- app.Use("/", func(c *Ctx) {
- c.Next()
- })
-
- app.Get("/test", func(c *Ctx) {
- c.Set("X-Next-Result", "Works")
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "Works", resp.Header.Get("X-Next-Result"))
-}
-func Test_Ctx_Redirect(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Redirect("http://example.com", 301)
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 301, resp.StatusCode, "Status code")
- assertEqual(t, "http://example.com", resp.Header.Get("Location"))
-}
-func Test_Ctx_Render(t *testing.T) {
- // TODO
-}
-func Test_Ctx_Send(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Send([]byte("Hello, World"))
- c.Send("Don't crash please")
- c.Send(1337)
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `1337`, string(body))
-}
-func Test_Ctx_SendBytes(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.SendBytes([]byte("Hello, World"))
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `Hello, World`, string(body))
-}
-func Test_Ctx_SendStatus(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.SendStatus(415)
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 415, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `Unsupported Media Type`, string(body))
-}
-func Test_Ctx_SendString(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.SendString("Don't crash please")
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `Don't crash please`, string(body))
-}
-func Test_Ctx_Set(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Set("X-1", "1")
- c.Set("X-2", "2")
- c.Set("X-3", "3")
- c.Set("X-3", "1337")
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "1", resp.Header.Get("X-1"))
- assertEqual(t, "2", resp.Header.Get("X-2"))
- assertEqual(t, "1337", resp.Header.Get("X-3"))
-}
-func Test_Ctx_Status(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Status(400)
- c.Status(415).Send("Hello, World")
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 415, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `Hello, World`, string(body))
-}
-func Test_Ctx_Type(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Type(".json")
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "application/json", resp.Header.Get("Content-Type"))
-}
-func Test_Ctx_Vary(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Vary("Origin")
- c.Vary("User-Agent")
- c.Vary("Accept-Encoding", "Accept")
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
- assertEqual(t, "Origin, User-Agent, Accept-Encoding, Accept", resp.Header.Get("Vary"))
-}
-func Test_Ctx_Write(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- c.Write("Hello, ")
- c.Write([]byte("World! "))
- c.Write(123)
- })
-
- req := httptest.NewRequest("GET", "http://example.com/test", nil)
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-
- body, err := ioutil.ReadAll(resp.Body)
- assertEqual(t, nil, err)
- assertEqual(t, `Hello, World! 123`, string(body))
-}
-
-func Test_Ctx_XHR(t *testing.T) {
- app := New()
-
- app.Get("/test", func(c *Ctx) {
- assertEqual(t, true, c.XHR())
- })
-
- req := httptest.NewRequest("GET", "/test", nil)
- req.Header.Set("X-Requested-With", "XMLHttpRequest")
-
- resp, err := app.Test(req)
- assertEqual(t, nil, err, "app.Test(req)")
- assertEqual(t, 200, resp.StatusCode, "Status code")
-}
+// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
+// 🤖 Github Repository: https://github.com/gofiber/fiber
+// 📌 API Documentation: https://docs.gofiber.io
+
+package fiber
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "mime/multipart"
+ "net/http"
+ "net/http/httptest"
+ "net/url"
+ "os"
+ "strconv"
+ "strings"
+ "testing"
+ "time"
+)
+
+func Test_Ctx_Accepts(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "", c.Accepts(""))
+ assertEqual(t, ".xml", c.Accepts(".xml"))
+ assertEqual(t, "", c.Accepts(".john"))
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_AcceptsCharsets(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "utf-8", c.AcceptsCharsets("utf-8"))
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("Accept-Charset", "utf-8, iso-8859-1;q=0.5")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_AcceptsEncodings(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "gzip", c.AcceptsEncodings("gzip"))
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("Accept-Encoding", "deflate, gzip;q=1.0, *;q=0.5")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_AcceptsLanguages(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "fr", c.AcceptsLanguages("fr"))
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("Accept-Language", "fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_BaseURL(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "http://google.com", c.BaseURL())
+ })
+
+ req := httptest.NewRequest("GET", "http://google.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Body(t *testing.T) {
+ app := New()
+
+ app.Post("/test", func(c *Ctx) {
+ assertEqual(t, "john=doe", c.Body())
+ })
+
+ data := url.Values{}
+ data.Set("john", "doe")
+
+ req := httptest.NewRequest("POST", "/test", strings.NewReader(data.Encode()))
+ req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
+ req.Header.Add("Content-Length", strconv.Itoa(len(data.Encode())))
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_BodyParser(t *testing.T) {
+ app := New()
+
+ type Demo struct {
+ Name string `json:"name" xml:"name" form:"name" query:"name"`
+ }
+ type Query struct {
+ ID int
+ Name string
+ Hobby []string
+ }
+
+ app.Post("/test", func(c *Ctx) {
+ d := new(Demo)
+ assertEqual(t, nil, c.BodyParser(d))
+ assertEqual(t, "john", d.Name)
+ })
+
+ app.Get("/query", func(c *Ctx) {
+ d := new(Query)
+ assertEqual(t, nil, c.BodyParser(d))
+ assertEqual(t, 2, len(d.Hobby))
+ })
+
+ req := httptest.NewRequest("POST", "/test", bytes.NewBuffer([]byte(`{"name":"john"}`)))
+ req.Header.Set("Content-Type", "application/json")
+ req.Header.Set("Content-Length", strconv.Itoa(len([]byte(`{"name":"john"}`))))
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ req = httptest.NewRequest("GET", "/query?id=1&name=tom&hobby=basketball&hobby=football", nil)
+
+ resp, err = app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Cookies(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "doe", c.Cookies("john"))
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.AddCookie(&http.Cookie{Name: "john", Value: "doe"})
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_FormFile(t *testing.T) {
+ app := New()
+
+ app.Post("/test", func(c *Ctx) {
+ fh, err := c.FormFile("file")
+ assertEqual(t, nil, err)
+ assertEqual(t, "test", fh.Filename)
+
+ f, err := fh.Open()
+ assertEqual(t, nil, err)
+
+ b := new(bytes.Buffer)
+ _, err = io.Copy(b, f)
+ assertEqual(t, nil, err)
+
+ f.Close()
+ assertEqual(t, "hello world", b.String())
+ })
+
+ body := &bytes.Buffer{}
+ writer := multipart.NewWriter(body)
+
+ ioWriter, err := writer.CreateFormFile("file", "test")
+ assertEqual(t, nil, err)
+
+ _, err = ioWriter.Write([]byte("hello world"))
+ assertEqual(t, nil, err)
+
+ writer.Close()
+
+ req := httptest.NewRequest("POST", "/test", body)
+ req.Header.Set("Content-Type", writer.FormDataContentType())
+ req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_FormValue(t *testing.T) {
+ app := New()
+
+ app.Post("/test", func(c *Ctx) {
+ assertEqual(t, "john", c.FormValue("name"))
+ })
+
+ body := &bytes.Buffer{}
+ writer := multipart.NewWriter(body)
+
+ assertEqual(t, nil, writer.WriteField("name", "john"))
+
+ writer.Close()
+ req := httptest.NewRequest("POST", "/test", body)
+ req.Header.Set("Content-Type", fmt.Sprintf("multipart/form-data; boundary=%s", writer.Boundary()))
+ req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Fresh(t *testing.T) {
+ app := New()
+ // TODO
+ app.Get("/test", func(c *Ctx) {
+ c.Fresh()
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Get(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "utf-8, iso-8859-1;q=0.5", c.Get("Accept-Charset"))
+ assertEqual(t, "Monster", c.Get("referrer"))
+ })
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("Accept-Charset", "utf-8, iso-8859-1;q=0.5")
+ req.Header.Set("Referer", "Monster")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Hostname(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "google.com", c.Hostname())
+ })
+
+ req := httptest.NewRequest("GET", "http://google.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_IP(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "0.0.0.0", c.IP())
+ })
+
+ req := httptest.NewRequest("GET", "http://google.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_IPs(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, []string{"0.0.0.0", "1.1.1.1"}, c.IPs())
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("X-Forwarded-For", "0.0.0.0, 1.1.1.1")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+
+// func Test_Ctx_Is(t *testing.T) {
+// app := New()
+// app.Get("/test", func(c *Ctx) {
+// c.Is(".json")
+// expect := true
+// result := c.Is("html")
+// if result != expect {
+// t.Fatalf(`%s: Expecting %v, got %v`, t.Name(), expect, result)
+// }
+// })
+// req := httptest.NewRequest("GET", "/test", nil)
+// req.Header.Set("Content-Type", "text/html")
+// resp, err := app.Test(req)
+// if err != nil {
+// t.Fatalf(`%s: %s`, t.Name(), err)
+// }
+// if resp.StatusCode != 200 {
+// t.Fatalf(`%s: StatusCode %v`, t.Name(), resp.StatusCode)
+// }
+// }
+func Test_Ctx_Locals(t *testing.T) {
+ app := New()
+
+ app.Use(func(c *Ctx) {
+ c.Locals("john", "doe")
+ c.Next()
+ })
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "doe", c.Locals("john"))
+ })
+
+ resp, err := app.Test(httptest.NewRequest("GET", "/test", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Method(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "GET", c.Method())
+ })
+ app.Post("/test", func(c *Ctx) {
+ assertEqual(t, "POST", c.Method())
+ })
+ app.Put("/test", func(c *Ctx) {
+ assertEqual(t, "PUT", c.Method())
+ })
+
+ resp, err := app.Test(httptest.NewRequest("GET", "/test", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ resp, err = app.Test(httptest.NewRequest("POST", "/test", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ resp, err = app.Test(httptest.NewRequest("PUT", "/test", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_MultipartForm(t *testing.T) {
+ app := New()
+
+ app.Post("/test", func(c *Ctx) {
+ result, err := c.MultipartForm()
+ assertEqual(t, nil, err)
+ assertEqual(t, "john", result.Value["name"][0])
+ })
+
+ body := &bytes.Buffer{}
+ writer := multipart.NewWriter(body)
+
+ assertEqual(t, nil, writer.WriteField("name", "john"))
+
+ writer.Close()
+ req := httptest.NewRequest("POST", "/test", body)
+ req.Header.Set("Content-Type", fmt.Sprintf("multipart/form-data; boundary=%s", writer.Boundary()))
+ req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_OriginalURL(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "http://google.com/test?search=demo", c.OriginalURL())
+ })
+
+ resp, err := app.Test(httptest.NewRequest("GET", "http://google.com/test?search=demo", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Params(t *testing.T) {
+ app := New()
+
+ app.Get("/test/:user", func(c *Ctx) {
+ assertEqual(t, "john", c.Params("user"))
+ })
+
+ app.Get("/test2/*", func(c *Ctx) {
+ assertEqual(t, "im/a/cookie", c.Params("*"))
+ })
+
+ app.Get("/test3/:optional?", func(c *Ctx) {
+ assertEqual(t, "", c.Params("optional"))
+ })
+
+ resp, err := app.Test(httptest.NewRequest("GET", "/test/john", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ resp, err = app.Test(httptest.NewRequest("GET", "/test2/im/a/cookie", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ resp, err = app.Test(httptest.NewRequest("GET", "/test3", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Path(t *testing.T) {
+ app := New()
+
+ app.Get("/test/:user", func(c *Ctx) {
+ assertEqual(t, "/test/john", c.Path())
+ })
+
+ req := httptest.NewRequest("GET", "/test/john", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Query(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "john", c.Query("search"))
+ assertEqual(t, "20", c.Query("age"))
+ })
+ req := httptest.NewRequest("GET", "/test?search=john&age=20", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Range(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ result, err := c.Range(1000)
+ assertEqual(t, nil, err)
+ assertEqual(t, "bytes", result.Type)
+ assertEqual(t, 500, result.Ranges[0].Start)
+ assertEqual(t, 700, result.Ranges[0].End)
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("range", "bytes=500-700")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Route(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, "/test", c.Route().Path)
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_SaveFile(t *testing.T) {
+ app := New()
+
+ app.Post("/test", func(c *Ctx) {
+ fh, err := c.FormFile("file")
+ assertEqual(t, nil, err)
+
+ tempFile, err := ioutil.TempFile(os.TempDir(), "test-")
+ assertEqual(t, nil, err)
+
+ defer os.Remove(tempFile.Name())
+ err = c.SaveFile(fh, tempFile.Name())
+ assertEqual(t, nil, err)
+
+ bs, err := ioutil.ReadFile(tempFile.Name())
+ assertEqual(t, nil, err)
+ assertEqual(t, "hello world", string(bs))
+ })
+
+ body := &bytes.Buffer{}
+ writer := multipart.NewWriter(body)
+
+ ioWriter, err := writer.CreateFormFile("file", "test")
+ assertEqual(t, nil, err)
+
+ _, err = ioWriter.Write([]byte("hello world"))
+ assertEqual(t, nil, err)
+ writer.Close()
+
+ req := httptest.NewRequest("POST", "/test", body)
+ req.Header.Set("Content-Type", writer.FormDataContentType())
+ req.Header.Set("Content-Length", strconv.Itoa(len(body.Bytes())))
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Secure(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, false, c.Secure())
+ })
+
+ // app.Get("/secure", func(c *Ctx) {
+ // assertEqual(t, true, c.Secure())
+ // })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ // req = httptest.NewRequest("GET", "https://google.com/secure", nil)
+
+ // resp, err = app.Test(req)
+ // assertEqual(t, nil, err, "app.Test(req)")
+ // assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Stale(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Stale()
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+func Test_Ctx_Subdomains(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, []string{"john", "doe"}, c.Subdomains())
+ })
+
+ req := httptest.NewRequest("GET", "http://john.doe.google.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
+
+func Test_Ctx_Append(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Append("X-Test", "Hello")
+ c.Append("X-Test", "World")
+ c.Append("X-Test", "Hello", "World")
+ })
+
+ resp, err := app.Test(httptest.NewRequest("GET", "/test", nil))
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "Hello, World", resp.Header.Get("X-Test"))
+}
+func Test_Ctx_Attachment(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Attachment()
+ c.Attachment("./static/img/logo.png")
+ })
+ req := httptest.NewRequest("GET", "/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, `attachment; filename="logo.png"`, resp.Header.Get("Content-Disposition"))
+ assertEqual(t, "image/png", resp.Header.Get("Content-Type"))
+}
+
+func Test_Ctx_ClearCookie(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.ClearCookie()
+ })
+
+ app.Get("/test2", func(c *Ctx) {
+ c.ClearCookie("john")
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.AddCookie(&http.Cookie{Name: "john", Value: "doe"})
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, true, strings.Contains(resp.Header.Get("Set-Cookie"), "expires="))
+
+ req = httptest.NewRequest("GET", "/test2", nil)
+ req.AddCookie(&http.Cookie{Name: "john", Value: "doe"})
+
+ resp, err = app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, true, strings.Contains(resp.Header.Get("Set-Cookie"), "expires="))
+}
+func Test_Ctx_Cookie(t *testing.T) {
+ app := New()
+
+ expire := time.Now().Add(24 * time.Hour)
+ var dst []byte
+ dst = expire.In(time.UTC).AppendFormat(dst, time.RFC1123)
+ httpdate := strings.Replace(string(dst), "UTC", "GMT", -1)
+
+ app.Get("/test", func(c *Ctx) {
+ cookie := new(Cookie)
+ cookie.Name = "username"
+ cookie.Value = "jon"
+ cookie.Expires = expire
+ c.Cookie(cookie)
+ })
+ req := httptest.NewRequest("GET", "/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ expireDate := "username=jon; expires=" + string(httpdate) + "; path=/"
+ assertEqual(t, true, strings.Contains(resp.Header.Get("Set-Cookie"), expireDate))
+}
+func Test_Ctx_Download(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Download("ctx.go")
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+
+ f, err := os.Open("./ctx.go")
+ assertEqual(t, nil, err)
+
+ defer f.Close()
+
+ expect, err := ioutil.ReadAll(f)
+ assertEqual(t, nil, err)
+ assertEqual(t, true, bytes.Equal(expect, body))
+}
+func Test_Ctx_Format(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Format("Hello, World!")
+ })
+
+ app.Get("/test2", func(c *Ctx) {
+ c.Format([]byte("Hello, World!"))
+ c.Format("Hello, World!")
+ })
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+ req.Header.Set("Accept", "text/html")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, "Hello, World!
", string(body))
+
+ req = httptest.NewRequest("GET", "http://example.com/test2", nil)
+ req.Header.Set("Accept", "application/json")
+
+ resp, err = app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ body, err = ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `"Hello, World!"`, string(body))
+}
+
+func Test_Ctx_JSON(t *testing.T) {
+ app := New()
+
+ type SomeStruct struct {
+ Name string
+ Age uint8
+ }
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, nil, c.JSON(""))
+
+ data := SomeStruct{
+ Name: "Grame",
+ Age: 20,
+ }
+ assertEqual(t, nil, c.JSON(data))
+ })
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "application/json", resp.Header.Get("Content-Type"))
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `{"Name":"Grame","Age":20}`, string(body))
+}
+func Test_Ctx_JSONP(t *testing.T) {
+ app := New()
+
+ type SomeStruct struct {
+ Name string
+ Age uint8
+ }
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, nil, c.JSONP(""))
+
+ data := SomeStruct{
+ Name: "Grame",
+ Age: 20,
+ }
+ assertEqual(t, nil, c.JSONP(data, "john"))
+ })
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "application/javascript", resp.Header.Get("Content-Type"))
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `john({"Name":"Grame","Age":20});`, string(body))
+}
+func Test_Ctx_Links(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Links(
+ "http://api.example.com/users?page=2", "next",
+ "http://api.example.com/users?page=5", "last",
+ )
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, `; rel="next",; rel="last"`, resp.Header.Get("Link"))
+}
+func Test_Ctx_Location(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Location("http://example.com")
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "http://example.com", resp.Header.Get("Location"))
+}
+func Test_Ctx_Next(t *testing.T) {
+ app := New()
+
+ app.Use("/", func(c *Ctx) {
+ c.Next()
+ })
+
+ app.Get("/test", func(c *Ctx) {
+ c.Set("X-Next-Result", "Works")
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "Works", resp.Header.Get("X-Next-Result"))
+}
+func Test_Ctx_Redirect(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Redirect("http://example.com", 301)
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 301, resp.StatusCode, "Status code")
+ assertEqual(t, "http://example.com", resp.Header.Get("Location"))
+}
+func Test_Ctx_Render(t *testing.T) {
+ // TODO
+}
+func Test_Ctx_Send(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Send([]byte("Hello, World"))
+ c.Send("Don't crash please")
+ c.Send(1337)
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `1337`, string(body))
+}
+func Test_Ctx_SendBytes(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.SendBytes([]byte("Hello, World"))
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `Hello, World`, string(body))
+}
+func Test_Ctx_SendStatus(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.SendStatus(415)
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 415, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `Unsupported Media Type`, string(body))
+}
+func Test_Ctx_SendString(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.SendString("Don't crash please")
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `Don't crash please`, string(body))
+}
+func Test_Ctx_Set(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Set("X-1", "1")
+ c.Set("X-2", "2")
+ c.Set("X-3", "3")
+ c.Set("X-3", "1337")
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "1", resp.Header.Get("X-1"))
+ assertEqual(t, "2", resp.Header.Get("X-2"))
+ assertEqual(t, "1337", resp.Header.Get("X-3"))
+}
+func Test_Ctx_Status(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Status(400)
+ c.Status(415).Send("Hello, World")
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 415, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `Hello, World`, string(body))
+}
+func Test_Ctx_Type(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Type(".json")
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "application/json", resp.Header.Get("Content-Type"))
+}
+func Test_Ctx_Vary(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Vary("Origin")
+ c.Vary("User-Agent")
+ c.Vary("Accept-Encoding", "Accept")
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+ assertEqual(t, "Origin, User-Agent, Accept-Encoding, Accept", resp.Header.Get("Vary"))
+}
+func Test_Ctx_Write(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ c.Write("Hello, ")
+ c.Write([]byte("World! "))
+ c.Write(123)
+ })
+
+ req := httptest.NewRequest("GET", "http://example.com/test", nil)
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+
+ body, err := ioutil.ReadAll(resp.Body)
+ assertEqual(t, nil, err)
+ assertEqual(t, `Hello, World! 123`, string(body))
+}
+
+func Test_Ctx_XHR(t *testing.T) {
+ app := New()
+
+ app.Get("/test", func(c *Ctx) {
+ assertEqual(t, true, c.XHR())
+ })
+
+ req := httptest.NewRequest("GET", "/test", nil)
+ req.Header.Set("X-Requested-With", "XMLHttpRequest")
+
+ resp, err := app.Test(req)
+ assertEqual(t, nil, err, "app.Test(req)")
+ assertEqual(t, 200, resp.StatusCode, "Status code")
+}
diff --git a/go.mod b/go.mod
index 5cc73318..7b05d315 100644
--- a/go.mod
+++ b/go.mod
@@ -1,9 +1,9 @@
-module github.com/gofiber/fiber
-
-go 1.11
-
-require (
- github.com/gorilla/schema v1.1.0
- github.com/valyala/bytebufferpool v1.0.0
- github.com/valyala/fasthttp v1.12.0
-)
+module github.com/gofiber/fiber
+
+go 1.11
+
+require (
+ github.com/gorilla/schema v1.1.0
+ github.com/valyala/bytebufferpool v1.0.0
+ github.com/valyala/fasthttp v1.12.0
+)
diff --git a/router_bench_test.go b/router_bench_test.go
index 02ae5aa2..94076c8c 100644
--- a/router_bench_test.go
+++ b/router_bench_test.go
@@ -1,617 +1,667 @@
-// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
-// 🤖 Github Repository: https://github.com/gofiber/fiber
-// 📌 API Documentation: https://docs.gofiber.io
-
-package fiber
-
-// go test -v ./... -run=^$ -bench=Benchmark_Router -benchmem -count=3
-
-import (
- "testing"
-)
-
-var routerBenchApp *App
-
-func init() {
- routerBenchApp = New()
- h := func(c *Ctx) {}
- for _, r := range githubAPI {
- switch r.method {
- case "GET":
- routerBenchApp.Get(r.path, h)
- case "POST":
- routerBenchApp.Post(r.path, h)
- case "PUT":
- routerBenchApp.Put(r.path, h)
- case "PATCH":
- routerBenchApp.Patch(r.path, h)
- case "DELETE":
- routerBenchApp.Delete(r.path, h)
- default:
- panic("Unknow HTTP method: " + r.method)
- }
- }
- for i := 0; i < 100; i++ {
- routerBenchApp.Use("/middleware", func(c *Ctx) {
- c.Next()
- })
- }
-}
-
-// go test -v ./... -run=^$ -bench=Benchmark_Router_Next_Stack -benchmem -count=3
-func Benchmark_Router_Next_Stack(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _, _ = matchRoute("GET", "/middleware")
- }
-}
-
-func Benchmark_Router_Github_API(b *testing.B) {
- for n := 0; n < b.N; n++ {
- for i := range testRoutes {
- _, _ = matchRoute(testRoutes[i].method, testRoutes[i].path)
- }
- }
-}
-
-func Benchmark_Router_Stacked_Route(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _, _ = matchRoute("GET", "/orgs/gofiber/public_members/fenny")
- }
-}
-
-func Benchmark_Router_Last_Route(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _, _ = matchRoute("DELETE", "/user/keys/1337")
- }
-}
-
-func Benchmark_Router_Middle_Route(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _, _ = matchRoute("GET", "/orgs/gofiber/public_members/fenny")
- }
-}
-
-func Benchmark_Router_First_Route(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _, _ = matchRoute("GET", "/authorizations")
- }
-}
-
-func matchRoute(method, path string) (match bool, values []string) {
- mINT := methodINT[method]
- for i := range routerBenchApp.routes[mINT] {
- _, _ = routerBenchApp.routes[mINT][i].matchRoute(path)
- }
- return
-}
-
-type testRoute struct {
- method string
- path string
-}
-
-var testRoutes = []testRoute{
- // OAuth Authorizations
- {"GET", "/authorizations"},
- {"GET", "/authorizations/1337"},
- {"POST", "/authorizations"},
- {"PUT", "/authorizations/clients/inf1nd873nf8912g9t"},
- {"PATCH", "/authorizations/1337"},
- {"DELETE", "/authorizations/1337"},
- {"GET", "/applications/2nds981mng6azl127y/tokens/sn108hbe1geheibf13f"},
- {"DELETE", "/applications/2nds981mng6azl127y/tokens"},
- {"DELETE", "/applications/2nds981mng6azl127y/tokens/sn108hbe1geheibf13f"},
-
- // Activity
- {"GET", "/events"},
- {"GET", "/repos/fenny/fiber/events"},
- {"GET", "/networks/fenny/fiber/events"},
- {"GET", "/orgs/gofiber/events"},
- {"GET", "/users/fenny/received_events"},
- {"GET", "/users/fenny/received_events/public"},
- {"GET", "/users/fenny/events"},
- {"GET", "/users/fenny/events/public"},
- {"GET", "/users/fenny/events/orgs/gofiber"},
- {"GET", "/feeds"},
- {"GET", "/notifications"},
- {"GET", "/repos/fenny/fiber/notifications"},
- {"PUT", "/notifications"},
- {"PUT", "/repos/fenny/fiber/notifications"},
- {"GET", "/notifications/threads/1337"},
- {"PATCH", "/notifications/threads/1337"},
- {"GET", "/notifications/threads/1337/subscription"},
- {"PUT", "/notifications/threads/1337/subscription"},
- {"DELETE", "/notifications/threads/1337/subscription"},
- {"GET", "/repos/fenny/fiber/stargazers"},
- {"GET", "/users/fenny/starred"},
- {"GET", "/user/starred"},
- {"GET", "/user/starred/fenny/fiber"},
- {"PUT", "/user/starred/fenny/fiber"},
- {"DELETE", "/user/starred/fenny/fiber"},
- {"GET", "/repos/fenny/fiber/subscribers"},
- {"GET", "/users/fenny/subscriptions"},
- {"GET", "/user/subscriptions"},
- {"GET", "/repos/fenny/fiber/subscription"},
- {"PUT", "/repos/fenny/fiber/subscription"},
- {"DELETE", "/repos/fenny/fiber/subscription"},
- {"GET", "/user/subscriptions/fenny/fiber"},
- {"PUT", "/user/subscriptions/fenny/fiber"},
- {"DELETE", "/user/subscriptions/fenny/fiber"},
-
- // Gists
- {"GET", "/users/fenny/gists"},
- {"GET", "/gists"},
- {"GET", "/gists/public"},
- {"GET", "/gists/starred"},
- {"GET", "/gists/1337"},
- {"POST", "/gists"},
- {"PATCH", "/gists/1337"},
- {"PUT", "/gists/1337/star"},
- {"DELETE", "/gists/1337/star"},
- {"GET", "/gists/1337/star"},
- {"POST", "/gists/1337/forks"},
- {"DELETE", "/gists/1337"},
-
- // Git Data
- {"GET", "/repos/fenny/fiber/git/blobs/v948b24g98ubngw9082bn02giub"},
- {"POST", "/repos/fenny/fiber/git/blobs"},
- {"GET", "/repos/fenny/fiber/git/commits/v948b24g98ubngw9082bn02giub"},
- {"POST", "/repos/fenny/fiber/git/commits"},
- {"GET", "/repos/fenny/fiber/git/refs/im/a/wildcard"},
- {"GET", "/repos/fenny/fiber/git/refs"},
- {"POST", "/repos/fenny/fiber/git/refs"},
- {"PATCH", "/repos/fenny/fiber/git/refs/im/a/wildcard"},
- {"DELETE", "/repos/fenny/fiber/git/refs/im/a/wildcard"},
- {"GET", "/repos/fenny/fiber/git/tags/v948b24g98ubngw9082bn02giub"},
- {"POST", "/repos/fenny/fiber/git/tags"},
- {"GET", "/repos/fenny/fiber/git/trees/v948b24g98ubngw9082bn02giub"},
- {"POST", "/repos/fenny/fiber/git/trees"},
-
- // Issues
- {"GET", "/issues"},
- {"GET", "/user/issues"},
- {"GET", "/orgs/gofiber/issues"},
- {"GET", "/repos/fenny/fiber/issues"},
- {"GET", "/repos/fenny/fiber/issues/1000"},
- {"POST", "/repos/fenny/fiber/issues"},
- {"PATCH", "/repos/fenny/fiber/issues/1000"},
- {"GET", "/repos/fenny/fiber/assignees"},
- {"GET", "/repos/fenny/fiber/assignees/nic"},
- {"GET", "/repos/fenny/fiber/issues/1000/comments"},
- {"GET", "/repos/fenny/fiber/issues/comments"},
- {"GET", "/repos/fenny/fiber/issues/comments/1337"},
- {"POST", "/repos/fenny/fiber/issues/1000/comments"},
- {"PATCH", "/repos/fenny/fiber/issues/comments/1337"},
- {"DELETE", "/repos/fenny/fiber/issues/comments/1337"},
- {"GET", "/repos/fenny/fiber/issues/1000/events"},
- {"GET", "/repos/fenny/fiber/issues/events"},
- {"GET", "/repos/fenny/fiber/issues/events/1337"},
- {"GET", "/repos/fenny/fiber/labels"},
- {"GET", "/repos/fenny/fiber/labels/john"},
- {"POST", "/repos/fenny/fiber/labels"},
- {"PATCH", "/repos/fenny/fiber/labels/john"},
- {"DELETE", "/repos/fenny/fiber/labels/john"},
- {"GET", "/repos/fenny/fiber/issues/1000/labels"},
- {"POST", "/repos/fenny/fiber/issues/1000/labels"},
- {"DELETE", "/repos/fenny/fiber/issues/1000/labels/john"},
- {"PUT", "/repos/fenny/fiber/issues/1000/labels"},
- {"DELETE", "/repos/fenny/fiber/issues/1000/labels"},
- {"GET", "/repos/fenny/fiber/milestones/1000/labels"},
- {"GET", "/repos/fenny/fiber/milestones"},
- {"GET", "/repos/fenny/fiber/milestones/1000"},
- {"POST", "/repos/fenny/fiber/milestones"},
- {"PATCH", "/repos/fenny/fiber/milestones/1000"},
- {"DELETE", "/repos/fenny/fiber/milestones/1000"},
-
- // Miscellaneous
- {"GET", "/emojis"},
- {"GET", "/gitignore/templates"},
- {"GET", "/gitignore/templates/john"},
- {"POST", "/markdown"},
- {"POST", "/markdown/raw"},
- {"GET", "/meta"},
- {"GET", "/rate_limit"},
-
- // Organizations
- {"GET", "/users/fenny/orgs"},
- {"GET", "/user/orgs"},
- {"GET", "/orgs/gofiber"},
- {"PATCH", "/orgs/gofiber"},
- {"GET", "/orgs/gofiber/members"},
- {"GET", "/orgs/gofiber/members/fenny"},
- {"DELETE", "/orgs/gofiber/members/fenny"},
- {"GET", "/orgs/gofiber/public_members"},
- {"GET", "/orgs/gofiber/public_members/fenny"},
- {"PUT", "/orgs/gofiber/public_members/fenny"},
- {"DELETE", "/orgs/gofiber/public_members/fenny"},
- {"GET", "/orgs/gofiber/teams"},
- {"GET", "/teams/1337"},
- {"POST", "/orgs/gofiber/teams"},
- {"PATCH", "/teams/1337"},
- {"DELETE", "/teams/1337"},
- {"GET", "/teams/1337/members"},
- {"GET", "/teams/1337/members/fenny"},
- {"PUT", "/teams/1337/members/fenny"},
- {"DELETE", "/teams/1337/members/fenny"},
- {"GET", "/teams/1337/repos"},
- {"GET", "/teams/1337/repos/fenny/fiber"},
- {"PUT", "/teams/1337/repos/fenny/fiber"},
- {"DELETE", "/teams/1337/repos/fenny/fiber"},
- {"GET", "/user/teams"},
-
- // Pull Requests
- {"GET", "/repos/fenny/fiber/pulls"},
- {"GET", "/repos/fenny/fiber/pulls/1000"},
- {"POST", "/repos/fenny/fiber/pulls"},
- {"PATCH", "/repos/fenny/fiber/pulls/1000"},
- {"GET", "/repos/fenny/fiber/pulls/1000/commits"},
- {"GET", "/repos/fenny/fiber/pulls/1000/files"},
- {"GET", "/repos/fenny/fiber/pulls/1000/merge"},
- {"PUT", "/repos/fenny/fiber/pulls/1000/merge"},
- {"GET", "/repos/fenny/fiber/pulls/1000/comments"},
- {"GET", "/repos/fenny/fiber/pulls/comments"},
- {"GET", "/repos/fenny/fiber/pulls/comments/1000"},
- {"PUT", "/repos/fenny/fiber/pulls/1000/comments"},
- {"PATCH", "/repos/fenny/fiber/pulls/comments/1000"},
- {"DELETE", "/repos/fenny/fiber/pulls/comments/1000"},
-
- // Repositories
- {"GET", "/user/repos"},
- {"GET", "/users/fenny/repos"},
- {"GET", "/orgs/gofiber/repos"},
- {"GET", "/repositories"},
- {"POST", "/user/repos"},
- {"POST", "/orgs/gofiber/repos"},
- {"GET", "/repos/fenny/fiber"},
- {"PATCH", "/repos/fenny/fiber"},
- {"GET", "/repos/fenny/fiber/contributors"},
- {"GET", "/repos/fenny/fiber/languages"},
- {"GET", "/repos/fenny/fiber/teams"},
- {"GET", "/repos/fenny/fiber/tags"},
- {"GET", "/repos/fenny/fiber/branches"},
- {"GET", "/repos/fenny/fiber/branches/master"},
- {"DELETE", "/repos/fenny/fiber"},
- {"GET", "/repos/fenny/fiber/collaborators"},
- {"GET", "/repos/fenny/fiber/collaborators/fenny"},
- {"PUT", "/repos/fenny/fiber/collaborators/fenny"},
- {"DELETE", "/repos/fenny/fiber/collaborators/fenny"},
- {"GET", "/repos/fenny/fiber/comments"},
- {"GET", "/repos/fenny/fiber/commits/v948b24g98ubngw9082bn02giub/comments"},
- {"POST", "/repos/fenny/fiber/commits/v948b24g98ubngw9082bn02giub/comments"},
- {"GET", "/repos/fenny/fiber/comments/1337"},
- {"PATCH", "/repos/fenny/fiber/comments/1337"},
- {"DELETE", "/repos/fenny/fiber/comments/1337"},
- {"GET", "/repos/fenny/fiber/commits"},
- {"GET", "/repos/fenny/fiber/commits/v948b24g98ubngw9082bn02giub"},
- {"GET", "/repos/fenny/fiber/readme"},
- {"GET", "/repos/fenny/fiber/contents/im/a/wildcard"},
- {"PUT", "/repos/fenny/fiber/contents/im/a/wildcard"},
- {"DELETE", "/repos/fenny/fiber/contents/im/a/wildcard"},
- {"GET", "/repos/fenny/fiber/gzip/google"},
- {"GET", "/repos/fenny/fiber/keys"},
- {"GET", "/repos/fenny/fiber/keys/1337"},
- {"POST", "/repos/fenny/fiber/keys"},
- {"PATCH", "/repos/fenny/fiber/keys/1337"},
- {"DELETE", "/repos/fenny/fiber/keys/1337"},
- {"GET", "/repos/fenny/fiber/downloads"},
- {"GET", "/repos/fenny/fiber/downloads/1337"},
- {"DELETE", "/repos/fenny/fiber/downloads/1337"},
- {"GET", "/repos/fenny/fiber/forks"},
- {"POST", "/repos/fenny/fiber/forks"},
- {"GET", "/repos/fenny/fiber/hooks"},
- {"GET", "/repos/fenny/fiber/hooks/1337"},
- {"POST", "/repos/fenny/fiber/hooks"},
- {"PATCH", "/repos/fenny/fiber/hooks/1337"},
- {"POST", "/repos/fenny/fiber/hooks/1337/tests"},
- {"DELETE", "/repos/fenny/fiber/hooks/1337"},
- {"POST", "/repos/fenny/fiber/merges"},
- {"GET", "/repos/fenny/fiber/releases"},
- {"GET", "/repos/fenny/fiber/releases/1337"},
- {"POST", "/repos/fenny/fiber/releases"},
- {"PATCH", "/repos/fenny/fiber/releases/1337"},
- {"DELETE", "/repos/fenny/fiber/releases/1337"},
- {"GET", "/repos/fenny/fiber/releases/1337/assets"},
- {"GET", "/repos/fenny/fiber/stats/contributors"},
- {"GET", "/repos/fenny/fiber/stats/commit_activity"},
- {"GET", "/repos/fenny/fiber/stats/code_frequency"},
- {"GET", "/repos/fenny/fiber/stats/participation"},
- {"GET", "/repos/fenny/fiber/stats/punch_card"},
- {"GET", "/repos/fenny/fiber/statuses/google"},
- {"POST", "/repos/fenny/fiber/statuses/google"},
-
- // Search
- {"GET", "/search/repositories"},
- {"GET", "/search/code"},
- {"GET", "/search/issues"},
- {"GET", "/search/users"},
- {"GET", "/legacy/issues/search/fenny/fibersitory/locked/finish"},
- {"GET", "/legacy/repos/search/finish"},
- {"GET", "/legacy/user/search/finish"},
- {"GET", "/legacy/user/email/info@gofiber.io"},
-
- // Users
- {"GET", "/users/fenny"},
- {"GET", "/user"},
- {"PATCH", "/user"},
- {"GET", "/users"},
- {"GET", "/user/emails"},
- {"POST", "/user/emails"},
- {"DELETE", "/user/emails"},
- {"GET", "/users/fenny/followers"},
- {"GET", "/user/followers"},
- {"GET", "/users/fenny/following"},
- {"GET", "/user/following"},
- {"GET", "/user/following/fenny"},
- {"GET", "/users/fenny/following/renan"},
- {"PUT", "/user/following/fenny"},
- {"DELETE", "/user/following/fenny"},
- {"GET", "/users/fenny/keys"},
- {"GET", "/user/keys"},
- {"GET", "/user/keys/1337"},
- {"POST", "/user/keys"},
- {"PATCH", "/user/keys/1337"},
- {"DELETE", "/user/keys/1337"},
-}
-
-var githubAPI = []testRoute{
- // OAuth Authorizations
- {"GET", "/authorizations"},
- {"GET", "/authorizations/:id"},
- {"POST", "/authorizations"},
- {"PUT", "/authorizations/clients/:client_id"},
- {"PATCH", "/authorizations/:id"},
- {"DELETE", "/authorizations/:id"},
- {"GET", "/applications/:client_id/tokens/:access_token"},
- {"DELETE", "/applications/:client_id/tokens"},
- {"DELETE", "/applications/:client_id/tokens/:access_token"},
-
- // Activity
- {"GET", "/events"},
- {"GET", "/repos/:owner/:repo/events"},
- {"GET", "/networks/:owner/:repo/events"},
- {"GET", "/orgs/:org/events"},
- {"GET", "/users/:user/received_events"},
- {"GET", "/users/:user/received_events/public"},
- {"GET", "/users/:user/events"},
- {"GET", "/users/:user/events/public"},
- {"GET", "/users/:user/events/orgs/:org"},
- {"GET", "/feeds"},
- {"GET", "/notifications"},
- {"GET", "/repos/:owner/:repo/notifications"},
- {"PUT", "/notifications"},
- {"PUT", "/repos/:owner/:repo/notifications"},
- {"GET", "/notifications/threads/:id"},
- {"PATCH", "/notifications/threads/:id"},
- {"GET", "/notifications/threads/:id/subscription"},
- {"PUT", "/notifications/threads/:id/subscription"},
- {"DELETE", "/notifications/threads/:id/subscription"},
- {"GET", "/repos/:owner/:repo/stargazers"},
- {"GET", "/users/:user/starred"},
- {"GET", "/user/starred"},
- {"GET", "/user/starred/:owner/:repo"},
- {"PUT", "/user/starred/:owner/:repo"},
- {"DELETE", "/user/starred/:owner/:repo"},
- {"GET", "/repos/:owner/:repo/subscribers"},
- {"GET", "/users/:user/subscriptions"},
- {"GET", "/user/subscriptions"},
- {"GET", "/repos/:owner/:repo/subscription"},
- {"PUT", "/repos/:owner/:repo/subscription"},
- {"DELETE", "/repos/:owner/:repo/subscription"},
- {"GET", "/user/subscriptions/:owner/:repo"},
- {"PUT", "/user/subscriptions/:owner/:repo"},
- {"DELETE", "/user/subscriptions/:owner/:repo"},
-
- // Gists
- {"GET", "/users/:user/gists"},
- {"GET", "/gists"},
- {"GET", "/gists/public"},
- {"GET", "/gists/starred"},
- {"GET", "/gists/:id"},
- {"POST", "/gists"},
- {"PATCH", "/gists/:id"},
- {"PUT", "/gists/:id/star"},
- {"DELETE", "/gists/:id/star"},
- {"GET", "/gists/:id/star"},
- {"POST", "/gists/:id/forks"},
- {"DELETE", "/gists/:id"},
-
- // Git Data
- {"GET", "/repos/:owner/:repo/git/blobs/:sha"},
- {"POST", "/repos/:owner/:repo/git/blobs"},
- {"GET", "/repos/:owner/:repo/git/commits/:sha"},
- {"POST", "/repos/:owner/:repo/git/commits"},
- {"GET", "/repos/:owner/:repo/git/refs/*"},
- {"GET", "/repos/:owner/:repo/git/refs"},
- {"POST", "/repos/:owner/:repo/git/refs"},
- {"PATCH", "/repos/:owner/:repo/git/refs/*"},
- {"DELETE", "/repos/:owner/:repo/git/refs/*"},
- {"GET", "/repos/:owner/:repo/git/tags/:sha"},
- {"POST", "/repos/:owner/:repo/git/tags"},
- {"GET", "/repos/:owner/:repo/git/trees/:sha"},
- {"POST", "/repos/:owner/:repo/git/trees"},
-
- // Issues
- {"GET", "/issues"},
- {"GET", "/user/issues"},
- {"GET", "/orgs/:org/issues"},
- {"GET", "/repos/:owner/:repo/issues"},
- {"GET", "/repos/:owner/:repo/issues/:number"},
- {"POST", "/repos/:owner/:repo/issues"},
- {"PATCH", "/repos/:owner/:repo/issues/:number"},
- {"GET", "/repos/:owner/:repo/assignees"},
- {"GET", "/repos/:owner/:repo/assignees/:assignee"},
- {"GET", "/repos/:owner/:repo/issues/:number/comments"},
- {"GET", "/repos/:owner/:repo/issues/comments"},
- {"GET", "/repos/:owner/:repo/issues/comments/:id"},
- {"POST", "/repos/:owner/:repo/issues/:number/comments"},
- {"PATCH", "/repos/:owner/:repo/issues/comments/:id"},
- {"DELETE", "/repos/:owner/:repo/issues/comments/:id"},
- {"GET", "/repos/:owner/:repo/issues/:number/events"},
- {"GET", "/repos/:owner/:repo/issues/events"},
- {"GET", "/repos/:owner/:repo/issues/events/:id"},
- {"GET", "/repos/:owner/:repo/labels"},
- {"GET", "/repos/:owner/:repo/labels/:name"},
- {"POST", "/repos/:owner/:repo/labels"},
- {"PATCH", "/repos/:owner/:repo/labels/:name"},
- {"DELETE", "/repos/:owner/:repo/labels/:name"},
- {"GET", "/repos/:owner/:repo/issues/:number/labels"},
- {"POST", "/repos/:owner/:repo/issues/:number/labels"},
- {"DELETE", "/repos/:owner/:repo/issues/:number/labels/:name"},
- {"PUT", "/repos/:owner/:repo/issues/:number/labels"},
- {"DELETE", "/repos/:owner/:repo/issues/:number/labels"},
- {"GET", "/repos/:owner/:repo/milestones/:number/labels"},
- {"GET", "/repos/:owner/:repo/milestones"},
- {"GET", "/repos/:owner/:repo/milestones/:number"},
- {"POST", "/repos/:owner/:repo/milestones"},
- {"PATCH", "/repos/:owner/:repo/milestones/:number"},
- {"DELETE", "/repos/:owner/:repo/milestones/:number"},
-
- // Miscellaneous
- {"GET", "/emojis"},
- {"GET", "/gitignore/templates"},
- {"GET", "/gitignore/templates/:name"},
- {"POST", "/markdown"},
- {"POST", "/markdown/raw"},
- {"GET", "/meta"},
- {"GET", "/rate_limit"},
-
- // Organizations
- {"GET", "/users/:user/orgs"},
- {"GET", "/user/orgs"},
- {"GET", "/orgs/:org"},
- {"PATCH", "/orgs/:org"},
- {"GET", "/orgs/:org/members"},
- {"GET", "/orgs/:org/members/:user"},
- {"DELETE", "/orgs/:org/members/:user"},
- {"GET", "/orgs/:org/public_members"},
- {"GET", "/orgs/:org/public_members/:user"},
- {"PUT", "/orgs/:org/public_members/:user"},
- {"DELETE", "/orgs/:org/public_members/:user"},
- {"GET", "/orgs/:org/teams"},
- {"GET", "/teams/:id"},
- {"POST", "/orgs/:org/teams"},
- {"PATCH", "/teams/:id"},
- {"DELETE", "/teams/:id"},
- {"GET", "/teams/:id/members"},
- {"GET", "/teams/:id/members/:user"},
- {"PUT", "/teams/:id/members/:user"},
- {"DELETE", "/teams/:id/members/:user"},
- {"GET", "/teams/:id/repos"},
- {"GET", "/teams/:id/repos/:owner/:repo"},
- {"PUT", "/teams/:id/repos/:owner/:repo"},
- {"DELETE", "/teams/:id/repos/:owner/:repo"},
- {"GET", "/user/teams"},
-
- // Pull Requests
- {"GET", "/repos/:owner/:repo/pulls"},
- {"GET", "/repos/:owner/:repo/pulls/:number"},
- {"POST", "/repos/:owner/:repo/pulls"},
- {"PATCH", "/repos/:owner/:repo/pulls/:number"},
- {"GET", "/repos/:owner/:repo/pulls/:number/commits"},
- {"GET", "/repos/:owner/:repo/pulls/:number/files"},
- {"GET", "/repos/:owner/:repo/pulls/:number/merge"},
- {"PUT", "/repos/:owner/:repo/pulls/:number/merge"},
- {"GET", "/repos/:owner/:repo/pulls/:number/comments"},
- {"GET", "/repos/:owner/:repo/pulls/comments"},
- {"GET", "/repos/:owner/:repo/pulls/comments/:number"},
- {"PUT", "/repos/:owner/:repo/pulls/:number/comments"},
- {"PATCH", "/repos/:owner/:repo/pulls/comments/:number"},
- {"DELETE", "/repos/:owner/:repo/pulls/comments/:number"},
-
- // Repositories
- {"GET", "/user/repos"},
- {"GET", "/users/:user/repos"},
- {"GET", "/orgs/:org/repos"},
- {"GET", "/repositories"},
- {"POST", "/user/repos"},
- {"POST", "/orgs/:org/repos"},
- {"GET", "/repos/:owner/:repo"},
- {"PATCH", "/repos/:owner/:repo"},
- {"GET", "/repos/:owner/:repo/contributors"},
- {"GET", "/repos/:owner/:repo/languages"},
- {"GET", "/repos/:owner/:repo/teams"},
- {"GET", "/repos/:owner/:repo/tags"},
- {"GET", "/repos/:owner/:repo/branches"},
- {"GET", "/repos/:owner/:repo/branches/:branch"},
- {"DELETE", "/repos/:owner/:repo"},
- {"GET", "/repos/:owner/:repo/collaborators"},
- {"GET", "/repos/:owner/:repo/collaborators/:user"},
- {"PUT", "/repos/:owner/:repo/collaborators/:user"},
- {"DELETE", "/repos/:owner/:repo/collaborators/:user"},
- {"GET", "/repos/:owner/:repo/comments"},
- {"GET", "/repos/:owner/:repo/commits/:sha/comments"},
- {"POST", "/repos/:owner/:repo/commits/:sha/comments"},
- {"GET", "/repos/:owner/:repo/comments/:id"},
- {"PATCH", "/repos/:owner/:repo/comments/:id"},
- {"DELETE", "/repos/:owner/:repo/comments/:id"},
- {"GET", "/repos/:owner/:repo/commits"},
- {"GET", "/repos/:owner/:repo/commits/:sha"},
- {"GET", "/repos/:owner/:repo/readme"},
- {"GET", "/repos/:owner/:repo/contents/*"},
- {"PUT", "/repos/:owner/:repo/contents/*"},
- {"DELETE", "/repos/:owner/:repo/contents/*"},
- {"GET", "/repos/:owner/:repo/:archive_format/:ref"},
- {"GET", "/repos/:owner/:repo/keys"},
- {"GET", "/repos/:owner/:repo/keys/:id"},
- {"POST", "/repos/:owner/:repo/keys"},
- {"PATCH", "/repos/:owner/:repo/keys/:id"},
- {"DELETE", "/repos/:owner/:repo/keys/:id"},
- {"GET", "/repos/:owner/:repo/downloads"},
- {"GET", "/repos/:owner/:repo/downloads/:id"},
- {"DELETE", "/repos/:owner/:repo/downloads/:id"},
- {"GET", "/repos/:owner/:repo/forks"},
- {"POST", "/repos/:owner/:repo/forks"},
- {"GET", "/repos/:owner/:repo/hooks"},
- {"GET", "/repos/:owner/:repo/hooks/:id"},
- {"POST", "/repos/:owner/:repo/hooks"},
- {"PATCH", "/repos/:owner/:repo/hooks/:id"},
- {"POST", "/repos/:owner/:repo/hooks/:id/tests"},
- {"DELETE", "/repos/:owner/:repo/hooks/:id"},
- {"POST", "/repos/:owner/:repo/merges"},
- {"GET", "/repos/:owner/:repo/releases"},
- {"GET", "/repos/:owner/:repo/releases/:id"},
- {"POST", "/repos/:owner/:repo/releases"},
- {"PATCH", "/repos/:owner/:repo/releases/:id"},
- {"DELETE", "/repos/:owner/:repo/releases/:id"},
- {"GET", "/repos/:owner/:repo/releases/:id/assets"},
- {"GET", "/repos/:owner/:repo/stats/contributors"},
- {"GET", "/repos/:owner/:repo/stats/commit_activity"},
- {"GET", "/repos/:owner/:repo/stats/code_frequency"},
- {"GET", "/repos/:owner/:repo/stats/participation"},
- {"GET", "/repos/:owner/:repo/stats/punch_card"},
- {"GET", "/repos/:owner/:repo/statuses/:ref"},
- {"POST", "/repos/:owner/:repo/statuses/:ref"},
-
- // Search
- {"GET", "/search/repositories"},
- {"GET", "/search/code"},
- {"GET", "/search/issues"},
- {"GET", "/search/users"},
- {"GET", "/legacy/issues/search/:owner/:repository/:state/:keyword"},
- {"GET", "/legacy/repos/search/:keyword"},
- {"GET", "/legacy/user/search/:keyword"},
- {"GET", "/legacy/user/email/:email"},
-
- // Users
- {"GET", "/users/:user"},
- {"GET", "/user"},
- {"PATCH", "/user"},
- {"GET", "/users"},
- {"GET", "/user/emails"},
- {"POST", "/user/emails"},
- {"DELETE", "/user/emails"},
- {"GET", "/users/:user/followers"},
- {"GET", "/user/followers"},
- {"GET", "/users/:user/following"},
- {"GET", "/user/following"},
- {"GET", "/user/following/:user"},
- {"GET", "/users/:user/following/:target_user"},
- {"PUT", "/user/following/:user"},
- {"DELETE", "/user/following/:user"},
- {"GET", "/users/:user/keys"},
- {"GET", "/user/keys"},
- {"GET", "/user/keys/:id"},
- {"POST", "/user/keys"},
- {"PATCH", "/user/keys/:id"},
- {"DELETE", "/user/keys/:id"},
-}
+// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
+// 🤖 Github Repository: https://github.com/gofiber/fiber
+// 📌 API Documentation: https://docs.gofiber.io
+
+package fiber
+
+// go test -v ./... -run=^$ -bench=Benchmark_Router -benchmem -count=3
+
+import (
+ "strings"
+ "testing"
+
+ fasthttp "github.com/valyala/fasthttp"
+)
+
+var routerBenchApp *App
+
+func init() {
+ routerBenchApp = New()
+ h := func(c *Ctx) {}
+ for _, r := range githubAPI {
+ switch r.method {
+ case "GET":
+ routerBenchApp.Get(r.path, h)
+ case "POST":
+ routerBenchApp.Post(r.path, h)
+ case "PUT":
+ routerBenchApp.Put(r.path, h)
+ case "PATCH":
+ routerBenchApp.Patch(r.path, h)
+ case "DELETE":
+ routerBenchApp.Delete(r.path, h)
+ default:
+ panic("Unknow HTTP method: " + r.method)
+ }
+ }
+ for i := 0; i < 100; i++ {
+ routerBenchApp.Use("/middleware", func(c *Ctx) {
+ c.Next()
+ })
+ }
+}
+
+func Benchmark_Router_CaseSensitive(b *testing.B) {
+ var path = "/RePos/GoFiBer/FibEr/iSsues/187643/CoMmEnts"
+ var res string
+
+ for n := 0; n < b.N; n++ {
+ res = strings.ToLower(path)
+ }
+
+ assertEqual(b, "/repos/gofiber/fiber/issues/187643/comments", res)
+}
+
+func Benchmark_Router_StrictRouting(b *testing.B) {
+ var path = "/repos/gofiber/fiber/issues/187643/comments/"
+ var res string
+
+ for n := 0; n < b.N; n++ {
+ res = strings.TrimRight(path, "/")
+ }
+
+ assertEqual(b, "/repos/gofiber/fiber/issues/187643/comments", res)
+}
+
+func Benchmark_Router_Handler(b *testing.B) {
+ c := &fasthttp.RequestCtx{}
+
+ c.Request.Header.SetMethod("DELETE")
+ c.URI().SetPath("/user/keys/1337")
+
+ for n := 0; n < b.N; n++ {
+ routerBenchApp.handler(c)
+ }
+}
+
+func Benchmark_Router_NextRoute(b *testing.B) {
+ c := AcquireCtx(&fasthttp.RequestCtx{})
+ defer ReleaseCtx(c)
+
+ c.Fasthttp.Request.Header.SetMethod("DELETE")
+ c.Fasthttp.URI().SetPath("/user/keys/1337")
+
+ for n := 0; n < b.N; n++ {
+ routerBenchApp.nextRoute(c)
+ }
+
+ assertEqual(b, len(githubAPI)+1, c.index-1)
+}
+
+// go test -v ./... -run=^$ -bench=Benchmark_Router_Next_Stack -benchmem -count=3
+func Benchmark_Router_Next_Stack(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _, _ = matchRoute("GET", "/middleware")
+ }
+}
+
+func Benchmark_Router_Github_API(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ for i := range testRoutes {
+ _, _ = matchRoute(testRoutes[i].method, testRoutes[i].path)
+ }
+ }
+}
+
+func Benchmark_Router_Stacked_Route(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _, _ = matchRoute("GET", "/orgs/gofiber/public_members/fenny")
+ }
+}
+
+func Benchmark_Router_Last_Route(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _, _ = matchRoute("DELETE", "/user/keys/1337")
+ }
+}
+
+func Benchmark_Router_Middle_Route(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _, _ = matchRoute("GET", "/orgs/gofiber/public_members/fenny")
+ }
+}
+
+func Benchmark_Router_First_Route(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _, _ = matchRoute("GET", "/authorizations")
+ }
+}
+
+func matchRoute(method, path string) (match bool, values []string) {
+ mINT := methodINT[method]
+ for i := range routerBenchApp.routes[mINT] {
+ _, _ = routerBenchApp.routes[mINT][i].matchRoute(path)
+ }
+ return
+}
+
+type testRoute struct {
+ method string
+ path string
+}
+
+var testRoutes = []testRoute{
+ // OAuth Authorizations
+ {"GET", "/authorizations"},
+ {"GET", "/authorizations/1337"},
+ {"POST", "/authorizations"},
+ {"PUT", "/authorizations/clients/inf1nd873nf8912g9t"},
+ {"PATCH", "/authorizations/1337"},
+ {"DELETE", "/authorizations/1337"},
+ {"GET", "/applications/2nds981mng6azl127y/tokens/sn108hbe1geheibf13f"},
+ {"DELETE", "/applications/2nds981mng6azl127y/tokens"},
+ {"DELETE", "/applications/2nds981mng6azl127y/tokens/sn108hbe1geheibf13f"},
+
+ // Activity
+ {"GET", "/events"},
+ {"GET", "/repos/fenny/fiber/events"},
+ {"GET", "/networks/fenny/fiber/events"},
+ {"GET", "/orgs/gofiber/events"},
+ {"GET", "/users/fenny/received_events"},
+ {"GET", "/users/fenny/received_events/public"},
+ {"GET", "/users/fenny/events"},
+ {"GET", "/users/fenny/events/public"},
+ {"GET", "/users/fenny/events/orgs/gofiber"},
+ {"GET", "/feeds"},
+ {"GET", "/notifications"},
+ {"GET", "/repos/fenny/fiber/notifications"},
+ {"PUT", "/notifications"},
+ {"PUT", "/repos/fenny/fiber/notifications"},
+ {"GET", "/notifications/threads/1337"},
+ {"PATCH", "/notifications/threads/1337"},
+ {"GET", "/notifications/threads/1337/subscription"},
+ {"PUT", "/notifications/threads/1337/subscription"},
+ {"DELETE", "/notifications/threads/1337/subscription"},
+ {"GET", "/repos/fenny/fiber/stargazers"},
+ {"GET", "/users/fenny/starred"},
+ {"GET", "/user/starred"},
+ {"GET", "/user/starred/fenny/fiber"},
+ {"PUT", "/user/starred/fenny/fiber"},
+ {"DELETE", "/user/starred/fenny/fiber"},
+ {"GET", "/repos/fenny/fiber/subscribers"},
+ {"GET", "/users/fenny/subscriptions"},
+ {"GET", "/user/subscriptions"},
+ {"GET", "/repos/fenny/fiber/subscription"},
+ {"PUT", "/repos/fenny/fiber/subscription"},
+ {"DELETE", "/repos/fenny/fiber/subscription"},
+ {"GET", "/user/subscriptions/fenny/fiber"},
+ {"PUT", "/user/subscriptions/fenny/fiber"},
+ {"DELETE", "/user/subscriptions/fenny/fiber"},
+
+ // Gists
+ {"GET", "/users/fenny/gists"},
+ {"GET", "/gists"},
+ {"GET", "/gists/public"},
+ {"GET", "/gists/starred"},
+ {"GET", "/gists/1337"},
+ {"POST", "/gists"},
+ {"PATCH", "/gists/1337"},
+ {"PUT", "/gists/1337/star"},
+ {"DELETE", "/gists/1337/star"},
+ {"GET", "/gists/1337/star"},
+ {"POST", "/gists/1337/forks"},
+ {"DELETE", "/gists/1337"},
+
+ // Git Data
+ {"GET", "/repos/fenny/fiber/git/blobs/v948b24g98ubngw9082bn02giub"},
+ {"POST", "/repos/fenny/fiber/git/blobs"},
+ {"GET", "/repos/fenny/fiber/git/commits/v948b24g98ubngw9082bn02giub"},
+ {"POST", "/repos/fenny/fiber/git/commits"},
+ {"GET", "/repos/fenny/fiber/git/refs/im/a/wildcard"},
+ {"GET", "/repos/fenny/fiber/git/refs"},
+ {"POST", "/repos/fenny/fiber/git/refs"},
+ {"PATCH", "/repos/fenny/fiber/git/refs/im/a/wildcard"},
+ {"DELETE", "/repos/fenny/fiber/git/refs/im/a/wildcard"},
+ {"GET", "/repos/fenny/fiber/git/tags/v948b24g98ubngw9082bn02giub"},
+ {"POST", "/repos/fenny/fiber/git/tags"},
+ {"GET", "/repos/fenny/fiber/git/trees/v948b24g98ubngw9082bn02giub"},
+ {"POST", "/repos/fenny/fiber/git/trees"},
+
+ // Issues
+ {"GET", "/issues"},
+ {"GET", "/user/issues"},
+ {"GET", "/orgs/gofiber/issues"},
+ {"GET", "/repos/fenny/fiber/issues"},
+ {"GET", "/repos/fenny/fiber/issues/1000"},
+ {"POST", "/repos/fenny/fiber/issues"},
+ {"PATCH", "/repos/fenny/fiber/issues/1000"},
+ {"GET", "/repos/fenny/fiber/assignees"},
+ {"GET", "/repos/fenny/fiber/assignees/nic"},
+ {"GET", "/repos/fenny/fiber/issues/1000/comments"},
+ {"GET", "/repos/fenny/fiber/issues/comments"},
+ {"GET", "/repos/fenny/fiber/issues/comments/1337"},
+ {"POST", "/repos/fenny/fiber/issues/1000/comments"},
+ {"PATCH", "/repos/fenny/fiber/issues/comments/1337"},
+ {"DELETE", "/repos/fenny/fiber/issues/comments/1337"},
+ {"GET", "/repos/fenny/fiber/issues/1000/events"},
+ {"GET", "/repos/fenny/fiber/issues/events"},
+ {"GET", "/repos/fenny/fiber/issues/events/1337"},
+ {"GET", "/repos/fenny/fiber/labels"},
+ {"GET", "/repos/fenny/fiber/labels/john"},
+ {"POST", "/repos/fenny/fiber/labels"},
+ {"PATCH", "/repos/fenny/fiber/labels/john"},
+ {"DELETE", "/repos/fenny/fiber/labels/john"},
+ {"GET", "/repos/fenny/fiber/issues/1000/labels"},
+ {"POST", "/repos/fenny/fiber/issues/1000/labels"},
+ {"DELETE", "/repos/fenny/fiber/issues/1000/labels/john"},
+ {"PUT", "/repos/fenny/fiber/issues/1000/labels"},
+ {"DELETE", "/repos/fenny/fiber/issues/1000/labels"},
+ {"GET", "/repos/fenny/fiber/milestones/1000/labels"},
+ {"GET", "/repos/fenny/fiber/milestones"},
+ {"GET", "/repos/fenny/fiber/milestones/1000"},
+ {"POST", "/repos/fenny/fiber/milestones"},
+ {"PATCH", "/repos/fenny/fiber/milestones/1000"},
+ {"DELETE", "/repos/fenny/fiber/milestones/1000"},
+
+ // Miscellaneous
+ {"GET", "/emojis"},
+ {"GET", "/gitignore/templates"},
+ {"GET", "/gitignore/templates/john"},
+ {"POST", "/markdown"},
+ {"POST", "/markdown/raw"},
+ {"GET", "/meta"},
+ {"GET", "/rate_limit"},
+
+ // Organizations
+ {"GET", "/users/fenny/orgs"},
+ {"GET", "/user/orgs"},
+ {"GET", "/orgs/gofiber"},
+ {"PATCH", "/orgs/gofiber"},
+ {"GET", "/orgs/gofiber/members"},
+ {"GET", "/orgs/gofiber/members/fenny"},
+ {"DELETE", "/orgs/gofiber/members/fenny"},
+ {"GET", "/orgs/gofiber/public_members"},
+ {"GET", "/orgs/gofiber/public_members/fenny"},
+ {"PUT", "/orgs/gofiber/public_members/fenny"},
+ {"DELETE", "/orgs/gofiber/public_members/fenny"},
+ {"GET", "/orgs/gofiber/teams"},
+ {"GET", "/teams/1337"},
+ {"POST", "/orgs/gofiber/teams"},
+ {"PATCH", "/teams/1337"},
+ {"DELETE", "/teams/1337"},
+ {"GET", "/teams/1337/members"},
+ {"GET", "/teams/1337/members/fenny"},
+ {"PUT", "/teams/1337/members/fenny"},
+ {"DELETE", "/teams/1337/members/fenny"},
+ {"GET", "/teams/1337/repos"},
+ {"GET", "/teams/1337/repos/fenny/fiber"},
+ {"PUT", "/teams/1337/repos/fenny/fiber"},
+ {"DELETE", "/teams/1337/repos/fenny/fiber"},
+ {"GET", "/user/teams"},
+
+ // Pull Requests
+ {"GET", "/repos/fenny/fiber/pulls"},
+ {"GET", "/repos/fenny/fiber/pulls/1000"},
+ {"POST", "/repos/fenny/fiber/pulls"},
+ {"PATCH", "/repos/fenny/fiber/pulls/1000"},
+ {"GET", "/repos/fenny/fiber/pulls/1000/commits"},
+ {"GET", "/repos/fenny/fiber/pulls/1000/files"},
+ {"GET", "/repos/fenny/fiber/pulls/1000/merge"},
+ {"PUT", "/repos/fenny/fiber/pulls/1000/merge"},
+ {"GET", "/repos/fenny/fiber/pulls/1000/comments"},
+ {"GET", "/repos/fenny/fiber/pulls/comments"},
+ {"GET", "/repos/fenny/fiber/pulls/comments/1000"},
+ {"PUT", "/repos/fenny/fiber/pulls/1000/comments"},
+ {"PATCH", "/repos/fenny/fiber/pulls/comments/1000"},
+ {"DELETE", "/repos/fenny/fiber/pulls/comments/1000"},
+
+ // Repositories
+ {"GET", "/user/repos"},
+ {"GET", "/users/fenny/repos"},
+ {"GET", "/orgs/gofiber/repos"},
+ {"GET", "/repositories"},
+ {"POST", "/user/repos"},
+ {"POST", "/orgs/gofiber/repos"},
+ {"GET", "/repos/fenny/fiber"},
+ {"PATCH", "/repos/fenny/fiber"},
+ {"GET", "/repos/fenny/fiber/contributors"},
+ {"GET", "/repos/fenny/fiber/languages"},
+ {"GET", "/repos/fenny/fiber/teams"},
+ {"GET", "/repos/fenny/fiber/tags"},
+ {"GET", "/repos/fenny/fiber/branches"},
+ {"GET", "/repos/fenny/fiber/branches/master"},
+ {"DELETE", "/repos/fenny/fiber"},
+ {"GET", "/repos/fenny/fiber/collaborators"},
+ {"GET", "/repos/fenny/fiber/collaborators/fenny"},
+ {"PUT", "/repos/fenny/fiber/collaborators/fenny"},
+ {"DELETE", "/repos/fenny/fiber/collaborators/fenny"},
+ {"GET", "/repos/fenny/fiber/comments"},
+ {"GET", "/repos/fenny/fiber/commits/v948b24g98ubngw9082bn02giub/comments"},
+ {"POST", "/repos/fenny/fiber/commits/v948b24g98ubngw9082bn02giub/comments"},
+ {"GET", "/repos/fenny/fiber/comments/1337"},
+ {"PATCH", "/repos/fenny/fiber/comments/1337"},
+ {"DELETE", "/repos/fenny/fiber/comments/1337"},
+ {"GET", "/repos/fenny/fiber/commits"},
+ {"GET", "/repos/fenny/fiber/commits/v948b24g98ubngw9082bn02giub"},
+ {"GET", "/repos/fenny/fiber/readme"},
+ {"GET", "/repos/fenny/fiber/contents/im/a/wildcard"},
+ {"PUT", "/repos/fenny/fiber/contents/im/a/wildcard"},
+ {"DELETE", "/repos/fenny/fiber/contents/im/a/wildcard"},
+ {"GET", "/repos/fenny/fiber/gzip/google"},
+ {"GET", "/repos/fenny/fiber/keys"},
+ {"GET", "/repos/fenny/fiber/keys/1337"},
+ {"POST", "/repos/fenny/fiber/keys"},
+ {"PATCH", "/repos/fenny/fiber/keys/1337"},
+ {"DELETE", "/repos/fenny/fiber/keys/1337"},
+ {"GET", "/repos/fenny/fiber/downloads"},
+ {"GET", "/repos/fenny/fiber/downloads/1337"},
+ {"DELETE", "/repos/fenny/fiber/downloads/1337"},
+ {"GET", "/repos/fenny/fiber/forks"},
+ {"POST", "/repos/fenny/fiber/forks"},
+ {"GET", "/repos/fenny/fiber/hooks"},
+ {"GET", "/repos/fenny/fiber/hooks/1337"},
+ {"POST", "/repos/fenny/fiber/hooks"},
+ {"PATCH", "/repos/fenny/fiber/hooks/1337"},
+ {"POST", "/repos/fenny/fiber/hooks/1337/tests"},
+ {"DELETE", "/repos/fenny/fiber/hooks/1337"},
+ {"POST", "/repos/fenny/fiber/merges"},
+ {"GET", "/repos/fenny/fiber/releases"},
+ {"GET", "/repos/fenny/fiber/releases/1337"},
+ {"POST", "/repos/fenny/fiber/releases"},
+ {"PATCH", "/repos/fenny/fiber/releases/1337"},
+ {"DELETE", "/repos/fenny/fiber/releases/1337"},
+ {"GET", "/repos/fenny/fiber/releases/1337/assets"},
+ {"GET", "/repos/fenny/fiber/stats/contributors"},
+ {"GET", "/repos/fenny/fiber/stats/commit_activity"},
+ {"GET", "/repos/fenny/fiber/stats/code_frequency"},
+ {"GET", "/repos/fenny/fiber/stats/participation"},
+ {"GET", "/repos/fenny/fiber/stats/punch_card"},
+ {"GET", "/repos/fenny/fiber/statuses/google"},
+ {"POST", "/repos/fenny/fiber/statuses/google"},
+
+ // Search
+ {"GET", "/search/repositories"},
+ {"GET", "/search/code"},
+ {"GET", "/search/issues"},
+ {"GET", "/search/users"},
+ {"GET", "/legacy/issues/search/fenny/fibersitory/locked/finish"},
+ {"GET", "/legacy/repos/search/finish"},
+ {"GET", "/legacy/user/search/finish"},
+ {"GET", "/legacy/user/email/info@gofiber.io"},
+
+ // Users
+ {"GET", "/users/fenny"},
+ {"GET", "/user"},
+ {"PATCH", "/user"},
+ {"GET", "/users"},
+ {"GET", "/user/emails"},
+ {"POST", "/user/emails"},
+ {"DELETE", "/user/emails"},
+ {"GET", "/users/fenny/followers"},
+ {"GET", "/user/followers"},
+ {"GET", "/users/fenny/following"},
+ {"GET", "/user/following"},
+ {"GET", "/user/following/fenny"},
+ {"GET", "/users/fenny/following/renan"},
+ {"PUT", "/user/following/fenny"},
+ {"DELETE", "/user/following/fenny"},
+ {"GET", "/users/fenny/keys"},
+ {"GET", "/user/keys"},
+ {"GET", "/user/keys/1337"},
+ {"POST", "/user/keys"},
+ {"PATCH", "/user/keys/1337"},
+ {"DELETE", "/user/keys/1337"},
+}
+
+var githubAPI = []testRoute{
+ // OAuth Authorizations
+ {"GET", "/authorizations"},
+ {"GET", "/authorizations/:id"},
+ {"POST", "/authorizations"},
+ {"PUT", "/authorizations/clients/:client_id"},
+ {"PATCH", "/authorizations/:id"},
+ {"DELETE", "/authorizations/:id"},
+ {"GET", "/applications/:client_id/tokens/:access_token"},
+ {"DELETE", "/applications/:client_id/tokens"},
+ {"DELETE", "/applications/:client_id/tokens/:access_token"},
+
+ // Activity
+ {"GET", "/events"},
+ {"GET", "/repos/:owner/:repo/events"},
+ {"GET", "/networks/:owner/:repo/events"},
+ {"GET", "/orgs/:org/events"},
+ {"GET", "/users/:user/received_events"},
+ {"GET", "/users/:user/received_events/public"},
+ {"GET", "/users/:user/events"},
+ {"GET", "/users/:user/events/public"},
+ {"GET", "/users/:user/events/orgs/:org"},
+ {"GET", "/feeds"},
+ {"GET", "/notifications"},
+ {"GET", "/repos/:owner/:repo/notifications"},
+ {"PUT", "/notifications"},
+ {"PUT", "/repos/:owner/:repo/notifications"},
+ {"GET", "/notifications/threads/:id"},
+ {"PATCH", "/notifications/threads/:id"},
+ {"GET", "/notifications/threads/:id/subscription"},
+ {"PUT", "/notifications/threads/:id/subscription"},
+ {"DELETE", "/notifications/threads/:id/subscription"},
+ {"GET", "/repos/:owner/:repo/stargazers"},
+ {"GET", "/users/:user/starred"},
+ {"GET", "/user/starred"},
+ {"GET", "/user/starred/:owner/:repo"},
+ {"PUT", "/user/starred/:owner/:repo"},
+ {"DELETE", "/user/starred/:owner/:repo"},
+ {"GET", "/repos/:owner/:repo/subscribers"},
+ {"GET", "/users/:user/subscriptions"},
+ {"GET", "/user/subscriptions"},
+ {"GET", "/repos/:owner/:repo/subscription"},
+ {"PUT", "/repos/:owner/:repo/subscription"},
+ {"DELETE", "/repos/:owner/:repo/subscription"},
+ {"GET", "/user/subscriptions/:owner/:repo"},
+ {"PUT", "/user/subscriptions/:owner/:repo"},
+ {"DELETE", "/user/subscriptions/:owner/:repo"},
+
+ // Gists
+ {"GET", "/users/:user/gists"},
+ {"GET", "/gists"},
+ {"GET", "/gists/public"},
+ {"GET", "/gists/starred"},
+ {"GET", "/gists/:id"},
+ {"POST", "/gists"},
+ {"PATCH", "/gists/:id"},
+ {"PUT", "/gists/:id/star"},
+ {"DELETE", "/gists/:id/star"},
+ {"GET", "/gists/:id/star"},
+ {"POST", "/gists/:id/forks"},
+ {"DELETE", "/gists/:id"},
+
+ // Git Data
+ {"GET", "/repos/:owner/:repo/git/blobs/:sha"},
+ {"POST", "/repos/:owner/:repo/git/blobs"},
+ {"GET", "/repos/:owner/:repo/git/commits/:sha"},
+ {"POST", "/repos/:owner/:repo/git/commits"},
+ {"GET", "/repos/:owner/:repo/git/refs/*"},
+ {"GET", "/repos/:owner/:repo/git/refs"},
+ {"POST", "/repos/:owner/:repo/git/refs"},
+ {"PATCH", "/repos/:owner/:repo/git/refs/*"},
+ {"DELETE", "/repos/:owner/:repo/git/refs/*"},
+ {"GET", "/repos/:owner/:repo/git/tags/:sha"},
+ {"POST", "/repos/:owner/:repo/git/tags"},
+ {"GET", "/repos/:owner/:repo/git/trees/:sha"},
+ {"POST", "/repos/:owner/:repo/git/trees"},
+
+ // Issues
+ {"GET", "/issues"},
+ {"GET", "/user/issues"},
+ {"GET", "/orgs/:org/issues"},
+ {"GET", "/repos/:owner/:repo/issues"},
+ {"GET", "/repos/:owner/:repo/issues/:number"},
+ {"POST", "/repos/:owner/:repo/issues"},
+ {"PATCH", "/repos/:owner/:repo/issues/:number"},
+ {"GET", "/repos/:owner/:repo/assignees"},
+ {"GET", "/repos/:owner/:repo/assignees/:assignee"},
+ {"GET", "/repos/:owner/:repo/issues/:number/comments"},
+ {"GET", "/repos/:owner/:repo/issues/comments"},
+ {"GET", "/repos/:owner/:repo/issues/comments/:id"},
+ {"POST", "/repos/:owner/:repo/issues/:number/comments"},
+ {"PATCH", "/repos/:owner/:repo/issues/comments/:id"},
+ {"DELETE", "/repos/:owner/:repo/issues/comments/:id"},
+ {"GET", "/repos/:owner/:repo/issues/:number/events"},
+ {"GET", "/repos/:owner/:repo/issues/events"},
+ {"GET", "/repos/:owner/:repo/issues/events/:id"},
+ {"GET", "/repos/:owner/:repo/labels"},
+ {"GET", "/repos/:owner/:repo/labels/:name"},
+ {"POST", "/repos/:owner/:repo/labels"},
+ {"PATCH", "/repos/:owner/:repo/labels/:name"},
+ {"DELETE", "/repos/:owner/:repo/labels/:name"},
+ {"GET", "/repos/:owner/:repo/issues/:number/labels"},
+ {"POST", "/repos/:owner/:repo/issues/:number/labels"},
+ {"DELETE", "/repos/:owner/:repo/issues/:number/labels/:name"},
+ {"PUT", "/repos/:owner/:repo/issues/:number/labels"},
+ {"DELETE", "/repos/:owner/:repo/issues/:number/labels"},
+ {"GET", "/repos/:owner/:repo/milestones/:number/labels"},
+ {"GET", "/repos/:owner/:repo/milestones"},
+ {"GET", "/repos/:owner/:repo/milestones/:number"},
+ {"POST", "/repos/:owner/:repo/milestones"},
+ {"PATCH", "/repos/:owner/:repo/milestones/:number"},
+ {"DELETE", "/repos/:owner/:repo/milestones/:number"},
+
+ // Miscellaneous
+ {"GET", "/emojis"},
+ {"GET", "/gitignore/templates"},
+ {"GET", "/gitignore/templates/:name"},
+ {"POST", "/markdown"},
+ {"POST", "/markdown/raw"},
+ {"GET", "/meta"},
+ {"GET", "/rate_limit"},
+
+ // Organizations
+ {"GET", "/users/:user/orgs"},
+ {"GET", "/user/orgs"},
+ {"GET", "/orgs/:org"},
+ {"PATCH", "/orgs/:org"},
+ {"GET", "/orgs/:org/members"},
+ {"GET", "/orgs/:org/members/:user"},
+ {"DELETE", "/orgs/:org/members/:user"},
+ {"GET", "/orgs/:org/public_members"},
+ {"GET", "/orgs/:org/public_members/:user"},
+ {"PUT", "/orgs/:org/public_members/:user"},
+ {"DELETE", "/orgs/:org/public_members/:user"},
+ {"GET", "/orgs/:org/teams"},
+ {"GET", "/teams/:id"},
+ {"POST", "/orgs/:org/teams"},
+ {"PATCH", "/teams/:id"},
+ {"DELETE", "/teams/:id"},
+ {"GET", "/teams/:id/members"},
+ {"GET", "/teams/:id/members/:user"},
+ {"PUT", "/teams/:id/members/:user"},
+ {"DELETE", "/teams/:id/members/:user"},
+ {"GET", "/teams/:id/repos"},
+ {"GET", "/teams/:id/repos/:owner/:repo"},
+ {"PUT", "/teams/:id/repos/:owner/:repo"},
+ {"DELETE", "/teams/:id/repos/:owner/:repo"},
+ {"GET", "/user/teams"},
+
+ // Pull Requests
+ {"GET", "/repos/:owner/:repo/pulls"},
+ {"GET", "/repos/:owner/:repo/pulls/:number"},
+ {"POST", "/repos/:owner/:repo/pulls"},
+ {"PATCH", "/repos/:owner/:repo/pulls/:number"},
+ {"GET", "/repos/:owner/:repo/pulls/:number/commits"},
+ {"GET", "/repos/:owner/:repo/pulls/:number/files"},
+ {"GET", "/repos/:owner/:repo/pulls/:number/merge"},
+ {"PUT", "/repos/:owner/:repo/pulls/:number/merge"},
+ {"GET", "/repos/:owner/:repo/pulls/:number/comments"},
+ {"GET", "/repos/:owner/:repo/pulls/comments"},
+ {"GET", "/repos/:owner/:repo/pulls/comments/:number"},
+ {"PUT", "/repos/:owner/:repo/pulls/:number/comments"},
+ {"PATCH", "/repos/:owner/:repo/pulls/comments/:number"},
+ {"DELETE", "/repos/:owner/:repo/pulls/comments/:number"},
+
+ // Repositories
+ {"GET", "/user/repos"},
+ {"GET", "/users/:user/repos"},
+ {"GET", "/orgs/:org/repos"},
+ {"GET", "/repositories"},
+ {"POST", "/user/repos"},
+ {"POST", "/orgs/:org/repos"},
+ {"GET", "/repos/:owner/:repo"},
+ {"PATCH", "/repos/:owner/:repo"},
+ {"GET", "/repos/:owner/:repo/contributors"},
+ {"GET", "/repos/:owner/:repo/languages"},
+ {"GET", "/repos/:owner/:repo/teams"},
+ {"GET", "/repos/:owner/:repo/tags"},
+ {"GET", "/repos/:owner/:repo/branches"},
+ {"GET", "/repos/:owner/:repo/branches/:branch"},
+ {"DELETE", "/repos/:owner/:repo"},
+ {"GET", "/repos/:owner/:repo/collaborators"},
+ {"GET", "/repos/:owner/:repo/collaborators/:user"},
+ {"PUT", "/repos/:owner/:repo/collaborators/:user"},
+ {"DELETE", "/repos/:owner/:repo/collaborators/:user"},
+ {"GET", "/repos/:owner/:repo/comments"},
+ {"GET", "/repos/:owner/:repo/commits/:sha/comments"},
+ {"POST", "/repos/:owner/:repo/commits/:sha/comments"},
+ {"GET", "/repos/:owner/:repo/comments/:id"},
+ {"PATCH", "/repos/:owner/:repo/comments/:id"},
+ {"DELETE", "/repos/:owner/:repo/comments/:id"},
+ {"GET", "/repos/:owner/:repo/commits"},
+ {"GET", "/repos/:owner/:repo/commits/:sha"},
+ {"GET", "/repos/:owner/:repo/readme"},
+ {"GET", "/repos/:owner/:repo/contents/*"},
+ {"PUT", "/repos/:owner/:repo/contents/*"},
+ {"DELETE", "/repos/:owner/:repo/contents/*"},
+ {"GET", "/repos/:owner/:repo/:archive_format/:ref"},
+ {"GET", "/repos/:owner/:repo/keys"},
+ {"GET", "/repos/:owner/:repo/keys/:id"},
+ {"POST", "/repos/:owner/:repo/keys"},
+ {"PATCH", "/repos/:owner/:repo/keys/:id"},
+ {"DELETE", "/repos/:owner/:repo/keys/:id"},
+ {"GET", "/repos/:owner/:repo/downloads"},
+ {"GET", "/repos/:owner/:repo/downloads/:id"},
+ {"DELETE", "/repos/:owner/:repo/downloads/:id"},
+ {"GET", "/repos/:owner/:repo/forks"},
+ {"POST", "/repos/:owner/:repo/forks"},
+ {"GET", "/repos/:owner/:repo/hooks"},
+ {"GET", "/repos/:owner/:repo/hooks/:id"},
+ {"POST", "/repos/:owner/:repo/hooks"},
+ {"PATCH", "/repos/:owner/:repo/hooks/:id"},
+ {"POST", "/repos/:owner/:repo/hooks/:id/tests"},
+ {"DELETE", "/repos/:owner/:repo/hooks/:id"},
+ {"POST", "/repos/:owner/:repo/merges"},
+ {"GET", "/repos/:owner/:repo/releases"},
+ {"GET", "/repos/:owner/:repo/releases/:id"},
+ {"POST", "/repos/:owner/:repo/releases"},
+ {"PATCH", "/repos/:owner/:repo/releases/:id"},
+ {"DELETE", "/repos/:owner/:repo/releases/:id"},
+ {"GET", "/repos/:owner/:repo/releases/:id/assets"},
+ {"GET", "/repos/:owner/:repo/stats/contributors"},
+ {"GET", "/repos/:owner/:repo/stats/commit_activity"},
+ {"GET", "/repos/:owner/:repo/stats/code_frequency"},
+ {"GET", "/repos/:owner/:repo/stats/participation"},
+ {"GET", "/repos/:owner/:repo/stats/punch_card"},
+ {"GET", "/repos/:owner/:repo/statuses/:ref"},
+ {"POST", "/repos/:owner/:repo/statuses/:ref"},
+
+ // Search
+ {"GET", "/search/repositories"},
+ {"GET", "/search/code"},
+ {"GET", "/search/issues"},
+ {"GET", "/search/users"},
+ {"GET", "/legacy/issues/search/:owner/:repository/:state/:keyword"},
+ {"GET", "/legacy/repos/search/:keyword"},
+ {"GET", "/legacy/user/search/:keyword"},
+ {"GET", "/legacy/user/email/:email"},
+
+ // Users
+ {"GET", "/users/:user"},
+ {"GET", "/user"},
+ {"PATCH", "/user"},
+ {"GET", "/users"},
+ {"GET", "/user/emails"},
+ {"POST", "/user/emails"},
+ {"DELETE", "/user/emails"},
+ {"GET", "/users/:user/followers"},
+ {"GET", "/user/followers"},
+ {"GET", "/users/:user/following"},
+ {"GET", "/user/following"},
+ {"GET", "/user/following/:user"},
+ {"GET", "/users/:user/following/:target_user"},
+ {"PUT", "/user/following/:user"},
+ {"DELETE", "/user/following/:user"},
+ {"GET", "/users/:user/keys"},
+ {"GET", "/user/keys"},
+ {"GET", "/user/keys/:id"},
+ {"POST", "/user/keys"},
+ {"PATCH", "/user/keys/:id"},
+ {"DELETE", "/user/keys/:id"},
+}
diff --git a/router_test.go b/router_test.go
index add891c2..2147977c 100644
--- a/router_test.go
+++ b/router_test.go
@@ -1,8 +1,8 @@
-// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
-// 📝 Github Repository: https://github.com/gofiber/fiber
-// 📌 API Documentation: https://docs.gofiber.io
-// ⚠️ This path parser was based on urlpath by @ucarion (MIT License).
-// 💖 Modified for the Fiber router by @renanbastos93 & @renewerner87
-// 🤖 ucarion/urlpath - renanbastos93/fastpath - renewerner87/fastpath
-
-package fiber
+// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
+// 📝 Github Repository: https://github.com/gofiber/fiber
+// 📌 API Documentation: https://docs.gofiber.io
+// ⚠️ This path parser was based on urlpath by @ucarion (MIT License).
+// 💖 Modified for the Fiber router by @renanbastos93 & @renewerner87
+// 🤖 ucarion/urlpath - renanbastos93/fastpath - renewerner87/fastpath
+
+package fiber
diff --git a/utils.go b/utils.go
index 84954e37..ef0d0bd2 100644
--- a/utils.go
+++ b/utils.go
@@ -209,11 +209,11 @@ var methodINT = map[string]int{
MethodHead: 1,
MethodPost: 2,
MethodPut: 3,
- MethodPatch: 4,
- MethodDelete: 5,
- MethodConnect: 6,
- MethodOptions: 7,
- MethodTrace: 8,
+ MethodDelete: 4,
+ MethodConnect: 5,
+ MethodOptions: 6,
+ MethodTrace: 7,
+ MethodPatch: 8,
}
// HTTP status codes were copied from net/http.
diff --git a/utils_bench_test.go b/utils_bench_test.go
index 947fa7b6..3f77a4cf 100644
--- a/utils_bench_test.go
+++ b/utils_bench_test.go
@@ -1,122 +1,122 @@
-// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
-// 📝 Github Repository: https://github.com/gofiber/fiber
-// 📌 API Documentation: https://docs.gofiber.io
-
-package fiber
-
-import (
- "testing"
-)
-
-// go test -v ./... -run=^$ -bench=Benchmark_CC_ -benchmem -count=3
-
-// func Benchmark_Utils_assertEqual(b *testing.B) {
-// // TODO
-// }
-
-func Benchmark_Utils_getGroupPath(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _ = getGroupPath("/v1", "/")
- _ = getGroupPath("/v1", "/api")
- _ = getGroupPath("/v1", "/api/register/:project")
- _ = getGroupPath("/v1/long/path/john/doe", "/why/this/name/is/so/awesome")
- }
-}
-
-func Benchmark_Utils_getMIME(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _ = getMIME(".json")
- _ = getMIME(".xml")
- _ = getMIME("xml")
- _ = getMIME("json")
- }
-}
-
-// func Benchmark_Utils_getArgument(b *testing.B) {
-// // TODO
-// }
-
-// func Benchmark_Utils_parseTokenList(b *testing.B) {
-// // TODO
-// }
-
-func Benchmark_Utils_getString(b *testing.B) {
- raw := []byte("Hello, World!")
- for n := 0; n < b.N; n++ {
- _ = getString(raw)
- }
-}
-
-func Benchmark_Utils_getStringImmutable(b *testing.B) {
- raw := []byte("Hello, World!")
- for n := 0; n < b.N; n++ {
- _ = getStringImmutable(raw)
- }
-}
-
-func Benchmark_Utils_getBytes(b *testing.B) {
- raw := "Hello, World!"
- for n := 0; n < b.N; n++ {
- _ = getBytes(raw)
- }
-}
-
-func Benchmark_Utils_getBytesImmutable(b *testing.B) {
- raw := "Hello, World!"
- for n := 0; n < b.N; n++ {
- _ = getBytesImmutable(raw)
- }
-}
-
-func Benchmark_Utils_methodINT(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _ = methodINT[MethodGet]
- _ = methodINT[MethodHead]
- _ = methodINT[MethodPost]
- _ = methodINT[MethodPut]
- _ = methodINT[MethodPatch]
- _ = methodINT[MethodDelete]
- _ = methodINT[MethodConnect]
- _ = methodINT[MethodOptions]
- _ = methodINT[MethodTrace]
- }
-}
-
-func Benchmark_Utils_statusMessage(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _ = statusMessage[100]
- _ = statusMessage[304]
- _ = statusMessage[423]
- _ = statusMessage[507]
- }
-}
-
-func Benchmark_Utils_extensionMIME(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _ = extensionMIME[".json"]
- _ = extensionMIME["json"]
- _ = extensionMIME["xspf"]
- _ = extensionMIME[".xspf"]
- _ = extensionMIME["avi"]
- _ = extensionMIME[".avi"]
- }
-}
-
-// func Benchmark_Utils_getParams(b *testing.B) {
-// // TODO
-// }
-
-// func Benchmark_Utils_matchParams(b *testing.B) {
-// // TODO
-// }
-
-func Benchmark_Utils_getTrimmedParam(b *testing.B) {
- for n := 0; n < b.N; n++ {
- _ = getTrimmedParam(":param")
- _ = getTrimmedParam(":param?")
- }
-}
-
-// func Benchmark_Utils_getCharPos(b *testing.B) {
-// // TODO
-// }
+// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
+// 📝 Github Repository: https://github.com/gofiber/fiber
+// 📌 API Documentation: https://docs.gofiber.io
+
+package fiber
+
+import (
+ "testing"
+)
+
+// go test -v ./... -run=^$ -bench=Benchmark_CC_ -benchmem -count=3
+
+// func Benchmark_Utils_assertEqual(b *testing.B) {
+// // TODO
+// }
+
+func Benchmark_Utils_getGroupPath(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _ = getGroupPath("/v1", "/")
+ _ = getGroupPath("/v1", "/api")
+ _ = getGroupPath("/v1", "/api/register/:project")
+ _ = getGroupPath("/v1/long/path/john/doe", "/why/this/name/is/so/awesome")
+ }
+}
+
+func Benchmark_Utils_getMIME(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _ = getMIME(".json")
+ _ = getMIME(".xml")
+ _ = getMIME("xml")
+ _ = getMIME("json")
+ }
+}
+
+// func Benchmark_Utils_getArgument(b *testing.B) {
+// // TODO
+// }
+
+// func Benchmark_Utils_parseTokenList(b *testing.B) {
+// // TODO
+// }
+
+func Benchmark_Utils_getString(b *testing.B) {
+ raw := []byte("Hello, World!")
+ for n := 0; n < b.N; n++ {
+ _ = getString(raw)
+ }
+}
+
+func Benchmark_Utils_getStringImmutable(b *testing.B) {
+ raw := []byte("Hello, World!")
+ for n := 0; n < b.N; n++ {
+ _ = getStringImmutable(raw)
+ }
+}
+
+func Benchmark_Utils_getBytes(b *testing.B) {
+ raw := "Hello, World!"
+ for n := 0; n < b.N; n++ {
+ _ = getBytes(raw)
+ }
+}
+
+func Benchmark_Utils_getBytesImmutable(b *testing.B) {
+ raw := "Hello, World!"
+ for n := 0; n < b.N; n++ {
+ _ = getBytesImmutable(raw)
+ }
+}
+
+func Benchmark_Utils_methodINT(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _ = methodINT[MethodGet]
+ _ = methodINT[MethodHead]
+ _ = methodINT[MethodPost]
+ _ = methodINT[MethodPut]
+ _ = methodINT[MethodPatch]
+ _ = methodINT[MethodDelete]
+ _ = methodINT[MethodConnect]
+ _ = methodINT[MethodOptions]
+ _ = methodINT[MethodTrace]
+ }
+}
+
+func Benchmark_Utils_statusMessage(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _ = statusMessage[100]
+ _ = statusMessage[304]
+ _ = statusMessage[423]
+ _ = statusMessage[507]
+ }
+}
+
+func Benchmark_Utils_extensionMIME(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _ = extensionMIME[".json"]
+ _ = extensionMIME["json"]
+ _ = extensionMIME["xspf"]
+ _ = extensionMIME[".xspf"]
+ _ = extensionMIME["avi"]
+ _ = extensionMIME[".avi"]
+ }
+}
+
+// func Benchmark_Utils_getParams(b *testing.B) {
+// // TODO
+// }
+
+// func Benchmark_Utils_matchParams(b *testing.B) {
+// // TODO
+// }
+
+func Benchmark_Utils_getTrimmedParam(b *testing.B) {
+ for n := 0; n < b.N; n++ {
+ _ = getTrimmedParam(":param")
+ _ = getTrimmedParam(":param?")
+ }
+}
+
+// func Benchmark_Utils_getCharPos(b *testing.B) {
+// // TODO
+// }
diff --git a/utils_test.go b/utils_test.go
index 98bf69d3..1afabab8 100644
--- a/utils_test.go
+++ b/utils_test.go
@@ -1,255 +1,255 @@
-// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
-// 📝 Github Repository: https://github.com/gofiber/fiber
-// 📌 API Documentation: https://docs.gofiber.io
-
-package fiber
-
-import (
- "fmt"
- "testing"
-)
-
-// func Test_Utils_assertEqual(t *testing.T) {
-// // TODO
-// }
-
-// func Test_Utils_setETag(t *testing.T) {
-// // TODO
-// }
-
-func Test_Utils_getGroupPath(t *testing.T) {
- res := getGroupPath("/v1", "/")
- assertEqual(t, "/v1", res)
-
- res = getGroupPath("/v1", "/")
- assertEqual(t, "/v1", res)
-
- res = getGroupPath("/", "/")
- assertEqual(t, "/", res)
-
- res = getGroupPath("/v1/api/", "/")
- assertEqual(t, "/v1/api/", res)
-}
-
-func Test_Utils_getMIME(t *testing.T) {
- res := getMIME(".json")
- assertEqual(t, "application/json", res)
-
- res = getMIME(".xml")
- assertEqual(t, "application/xml", res)
-
- res = getMIME("xml")
- assertEqual(t, "application/xml", res)
-
- res = getMIME("json")
- assertEqual(t, "application/json", res)
-}
-
-// func Test_Utils_getArgument(t *testing.T) {
-// // TODO
-// }
-
-// func Test_Utils_parseTokenList(t *testing.T) {
-// // TODO
-// }
-
-func Test_Utils_getString(t *testing.T) {
- res := getString([]byte("Hello, World!"))
- assertEqual(t, "Hello, World!", res)
-}
-
-func Test_Utils_getStringImmutable(t *testing.T) {
- res := getStringImmutable([]byte("Hello, World!"))
- assertEqual(t, "Hello, World!", res)
-}
-
-func Test_Utils_getBytes(t *testing.T) {
- res := getBytes("Hello, World!")
- assertEqual(t, []byte("Hello, World!"), res)
-}
-
-func Test_Utils_getBytesImmutable(t *testing.T) {
- res := getBytesImmutable("Hello, World!")
- assertEqual(t, []byte("Hello, World!"), res)
-}
-
-func Test_Utils_methodINT(t *testing.T) {
- res := methodINT[MethodGet]
- assertEqual(t, 0, res)
- res = methodINT[MethodHead]
- assertEqual(t, 1, res)
- res = methodINT[MethodPost]
- assertEqual(t, 2, res)
- res = methodINT[MethodPut]
- assertEqual(t, 3, res)
- res = methodINT[MethodPatch]
- assertEqual(t, 4, res)
- res = methodINT[MethodDelete]
- assertEqual(t, 5, res)
- res = methodINT[MethodConnect]
- assertEqual(t, 6, res)
- res = methodINT[MethodOptions]
- assertEqual(t, 7, res)
- res = methodINT[MethodTrace]
- assertEqual(t, 8, res)
-}
-
-func Test_Utils_statusMessage(t *testing.T) {
- res := statusMessage[102]
- assertEqual(t, "Processing", res)
-
- res = statusMessage[303]
- assertEqual(t, "See Other", res)
-
- res = statusMessage[404]
- assertEqual(t, "Not Found", res)
-
- res = statusMessage[507]
- assertEqual(t, "Insufficient Storage", res)
-
-}
-
-func Test_Utils_extensionMIME(t *testing.T) {
- res := extensionMIME[".html"]
- assertEqual(t, "text/html", res)
-
- res = extensionMIME["html"]
- assertEqual(t, "text/html", res)
-
- res = extensionMIME[".msp"]
- assertEqual(t, "application/octet-stream", res)
-
- res = extensionMIME["msp"]
- assertEqual(t, "application/octet-stream", res)
-}
-
-// func Test_Utils_getParams(t *testing.T) {
-// // TODO
-// }
-
-func Test_Utils_matchParams(t *testing.T) {
- type testparams struct {
- url string
- params []string
- match bool
- }
- testCase := func(r string, cases []testparams) {
- parser := getParams(r)
- for _, c := range cases {
- params, match := parser.getMatch(c.url, false)
- assertEqual(t, c.params, params, fmt.Sprintf("route: '%s', url: '%s'", r, c.url))
- assertEqual(t, c.match, match, fmt.Sprintf("route: '%s', url: '%s'", r, c.url))
- }
- }
- testCase("/api/v1/:param/*", []testparams{
- {url: "/api/v1/entity", params: []string{"entity", ""}, match: true},
- {url: "/api/v1/entity/", params: []string{"entity", ""}, match: true},
- {url: "/api/v1/entity/1", params: []string{"entity", "1"}, match: true},
- {url: "/api/v", params: nil, match: false},
- {url: "/api/v2", params: nil, match: false},
- {url: "/api/v1/", params: nil, match: false},
- })
- testCase("/api/v1/:param?", []testparams{
- {url: "/api/v1", params: []string{""}, match: true},
- {url: "/api/v1/", params: []string{""}, match: true},
- {url: "/api/v1/optional", params: []string{"optional"}, match: true},
- {url: "/api/v", params: nil, match: false},
- {url: "/api/v2", params: nil, match: false},
- {url: "/api/xyz", params: nil, match: false},
- })
- testCase("/api/v1/*", []testparams{
- {url: "/api/v1", params: []string{""}, match: true},
- {url: "/api/v1/", params: []string{""}, match: true},
- {url: "/api/v1/entity", params: []string{"entity"}, match: true},
- {url: "/api/v1/entity/1/2", params: []string{"entity/1/2"}, match: true},
- {url: "/api/v", params: nil, match: false},
- {url: "/api/v2", params: nil, match: false},
- {url: "/api/abc", params: nil, match: false},
- })
- testCase("/api/v1/:param", []testparams{
- {url: "/api/v1/entity", params: []string{"entity"}, match: true},
- {url: "/api/v1/entity/8728382", params: nil, match: false},
- {url: "/api/v1", params: nil, match: false},
- {url: "/api/v1/", params: nil, match: false},
- })
- testCase("/api/v1/const", []testparams{
- {url: "/api/v1/const", params: []string{}, match: true},
- {url: "/api/v1", params: nil, match: false},
- {url: "/api/v1/", params: nil, match: false},
- {url: "/api/v1/something", params: nil, match: false},
- })
- testCase("/api/v1/:param/abc/*", []testparams{
- {url: "/api/v1/well/abc/wildcard", params: []string{"well", "wildcard"}, match: true},
- {url: "/api/v1/well/abc/", params: []string{"well", ""}, match: true},
- {url: "/api/v1/well/abc", params: []string{"well", ""}, match: true},
- {url: "/api/v1/well/ttt", params: nil, match: false},
- })
- testCase("/api/:day/:month?/:year?", []testparams{
- {url: "/api/1", params: []string{"1", "", ""}, match: true},
- {url: "/api/1/", params: []string{"1", "", ""}, match: true},
- {url: "/api/1/2", params: []string{"1", "2", ""}, match: true},
- {url: "/api/1/2/3", params: []string{"1", "2", "3"}, match: true},
- {url: "/api/", params: nil, match: false},
- })
- testCase("/api/*", []testparams{
- {url: "/api/", params: []string{""}, match: true},
- {url: "/api/joker", params: []string{"joker"}, match: true},
- {url: "/api", params: []string{""}, match: true},
- {url: "/api/v1/entity", params: []string{"v1/entity"}, match: true},
- {url: "/api2/v1/entity", params: nil, match: false},
- {url: "/api_ignore/v1/entity", params: nil, match: false},
- })
- testCase("/api/*/:param?", []testparams{
- {url: "/api/", params: []string{"", ""}, match: true},
- {url: "/api/joker", params: []string{"joker", ""}, match: true},
- {url: "/api/joker/batman", params: []string{"joker", "batman"}, match: true},
- {url: "/api/joker/batman/robin", params: []string{"joker/batman", "robin"}, match: true},
- {url: "/api/joker/batman/robin/1", params: []string{"joker/batman/robin", "1"}, match: true},
- {url: "/api", params: []string{"", ""}, match: true},
- })
- testCase("/api/*/:param", []testparams{
- {url: "/api/test/abc", params: []string{"test", "abc"}, match: true},
- {url: "/api/joker/batman", params: []string{"joker", "batman"}, match: true},
- {url: "/api/joker/batman/robin", params: []string{"joker/batman", "robin"}, match: true},
- {url: "/api/joker/batman/robin/1", params: []string{"joker/batman/robin", "1"}, match: true},
- {url: "/api", params: nil, match: false},
- })
- testCase("/api/*/:param/:param2", []testparams{
- {url: "/api/test/abc", params: nil, match: false},
- {url: "/api/joker/batman", params: nil, match: false},
- {url: "/api/joker/batman/robin", params: []string{"joker", "batman", "robin"}, match: true},
- {url: "/api/joker/batman/robin/1", params: []string{"joker/batman", "robin", "1"}, match: true},
- {url: "/api/joker/batman/robin/1/2", params: []string{"joker/batman/robin", "1", "2"}, match: true},
- {url: "/api", params: nil, match: false},
- })
- testCase("/", []testparams{
- {url: "/api", params: nil, match: false},
- {url: "", params: []string{}, match: true},
- {url: "/", params: []string{}, match: true},
- })
- testCase("/config/abc.json", []testparams{
- {url: "/config/abc.json", params: []string{}, match: true},
- {url: "config/abc.json", params: nil, match: false},
- {url: "/config/efg.json", params: nil, match: false},
- {url: "/config", params: nil, match: false},
- })
- testCase("/config/*.json", []testparams{
- {url: "/config/abc.json", params: []string{"abc.json"}, match: true},
- {url: "/config/efg.json", params: []string{"efg.json"}, match: true},
- //{url: "/config/efg.csv", params: nil, match: false},// doesn`t work, current: params: "efg.csv", true
- {url: "config/abc.json", params: nil, match: false},
- {url: "/config", params: nil, match: false},
- })
- testCase("/xyz", []testparams{
- {url: "xyz", params: nil, match: false},
- {url: "xyz/", params: nil, match: false},
- })
-}
-
-// func Test_Utils_getTrimmedParam(t *testing.T) {
-// // TODO
-// }
-
-// func Test_Utils_getCharPos(t *testing.T) {
-// // TODO
-// }
+// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
+// 📝 Github Repository: https://github.com/gofiber/fiber
+// 📌 API Documentation: https://docs.gofiber.io
+
+package fiber
+
+import (
+ "fmt"
+ "testing"
+)
+
+// func Test_Utils_assertEqual(t *testing.T) {
+// // TODO
+// }
+
+// func Test_Utils_setETag(t *testing.T) {
+// // TODO
+// }
+
+func Test_Utils_getGroupPath(t *testing.T) {
+ res := getGroupPath("/v1", "/")
+ assertEqual(t, "/v1", res)
+
+ res = getGroupPath("/v1", "/")
+ assertEqual(t, "/v1", res)
+
+ res = getGroupPath("/", "/")
+ assertEqual(t, "/", res)
+
+ res = getGroupPath("/v1/api/", "/")
+ assertEqual(t, "/v1/api/", res)
+}
+
+func Test_Utils_getMIME(t *testing.T) {
+ res := getMIME(".json")
+ assertEqual(t, "application/json", res)
+
+ res = getMIME(".xml")
+ assertEqual(t, "application/xml", res)
+
+ res = getMIME("xml")
+ assertEqual(t, "application/xml", res)
+
+ res = getMIME("json")
+ assertEqual(t, "application/json", res)
+}
+
+// func Test_Utils_getArgument(t *testing.T) {
+// // TODO
+// }
+
+// func Test_Utils_parseTokenList(t *testing.T) {
+// // TODO
+// }
+
+func Test_Utils_getString(t *testing.T) {
+ res := getString([]byte("Hello, World!"))
+ assertEqual(t, "Hello, World!", res)
+}
+
+func Test_Utils_getStringImmutable(t *testing.T) {
+ res := getStringImmutable([]byte("Hello, World!"))
+ assertEqual(t, "Hello, World!", res)
+}
+
+func Test_Utils_getBytes(t *testing.T) {
+ res := getBytes("Hello, World!")
+ assertEqual(t, []byte("Hello, World!"), res)
+}
+
+func Test_Utils_getBytesImmutable(t *testing.T) {
+ res := getBytesImmutable("Hello, World!")
+ assertEqual(t, []byte("Hello, World!"), res)
+}
+
+func Test_Utils_methodINT(t *testing.T) {
+ res := methodINT[MethodGet]
+ assertEqual(t, 0, res)
+ res = methodINT[MethodHead]
+ assertEqual(t, 1, res)
+ res = methodINT[MethodPost]
+ assertEqual(t, 2, res)
+ res = methodINT[MethodPut]
+ assertEqual(t, 3, res)
+ res = methodINT[MethodDelete]
+ assertEqual(t, 4, res)
+ res = methodINT[MethodConnect]
+ assertEqual(t, 5, res)
+ res = methodINT[MethodOptions]
+ assertEqual(t, 6, res)
+ res = methodINT[MethodTrace]
+ assertEqual(t, 7, res)
+ res = methodINT[MethodPatch]
+ assertEqual(t, 8, res)
+}
+
+func Test_Utils_statusMessage(t *testing.T) {
+ res := statusMessage[102]
+ assertEqual(t, "Processing", res)
+
+ res = statusMessage[303]
+ assertEqual(t, "See Other", res)
+
+ res = statusMessage[404]
+ assertEqual(t, "Not Found", res)
+
+ res = statusMessage[507]
+ assertEqual(t, "Insufficient Storage", res)
+
+}
+
+func Test_Utils_extensionMIME(t *testing.T) {
+ res := extensionMIME[".html"]
+ assertEqual(t, "text/html", res)
+
+ res = extensionMIME["html"]
+ assertEqual(t, "text/html", res)
+
+ res = extensionMIME[".msp"]
+ assertEqual(t, "application/octet-stream", res)
+
+ res = extensionMIME["msp"]
+ assertEqual(t, "application/octet-stream", res)
+}
+
+// func Test_Utils_getParams(t *testing.T) {
+// // TODO
+// }
+
+func Test_Utils_matchParams(t *testing.T) {
+ type testparams struct {
+ url string
+ params []string
+ match bool
+ }
+ testCase := func(r string, cases []testparams) {
+ parser := getParams(r)
+ for _, c := range cases {
+ params, match := parser.getMatch(c.url, false)
+ assertEqual(t, c.params, params, fmt.Sprintf("route: '%s', url: '%s'", r, c.url))
+ assertEqual(t, c.match, match, fmt.Sprintf("route: '%s', url: '%s'", r, c.url))
+ }
+ }
+ testCase("/api/v1/:param/*", []testparams{
+ {url: "/api/v1/entity", params: []string{"entity", ""}, match: true},
+ {url: "/api/v1/entity/", params: []string{"entity", ""}, match: true},
+ {url: "/api/v1/entity/1", params: []string{"entity", "1"}, match: true},
+ {url: "/api/v", params: nil, match: false},
+ {url: "/api/v2", params: nil, match: false},
+ {url: "/api/v1/", params: nil, match: false},
+ })
+ testCase("/api/v1/:param?", []testparams{
+ {url: "/api/v1", params: []string{""}, match: true},
+ {url: "/api/v1/", params: []string{""}, match: true},
+ {url: "/api/v1/optional", params: []string{"optional"}, match: true},
+ {url: "/api/v", params: nil, match: false},
+ {url: "/api/v2", params: nil, match: false},
+ {url: "/api/xyz", params: nil, match: false},
+ })
+ testCase("/api/v1/*", []testparams{
+ {url: "/api/v1", params: []string{""}, match: true},
+ {url: "/api/v1/", params: []string{""}, match: true},
+ {url: "/api/v1/entity", params: []string{"entity"}, match: true},
+ {url: "/api/v1/entity/1/2", params: []string{"entity/1/2"}, match: true},
+ {url: "/api/v", params: nil, match: false},
+ {url: "/api/v2", params: nil, match: false},
+ {url: "/api/abc", params: nil, match: false},
+ })
+ testCase("/api/v1/:param", []testparams{
+ {url: "/api/v1/entity", params: []string{"entity"}, match: true},
+ {url: "/api/v1/entity/8728382", params: nil, match: false},
+ {url: "/api/v1", params: nil, match: false},
+ {url: "/api/v1/", params: nil, match: false},
+ })
+ testCase("/api/v1/const", []testparams{
+ {url: "/api/v1/const", params: []string{}, match: true},
+ {url: "/api/v1", params: nil, match: false},
+ {url: "/api/v1/", params: nil, match: false},
+ {url: "/api/v1/something", params: nil, match: false},
+ })
+ testCase("/api/v1/:param/abc/*", []testparams{
+ {url: "/api/v1/well/abc/wildcard", params: []string{"well", "wildcard"}, match: true},
+ {url: "/api/v1/well/abc/", params: []string{"well", ""}, match: true},
+ {url: "/api/v1/well/abc", params: []string{"well", ""}, match: true},
+ {url: "/api/v1/well/ttt", params: nil, match: false},
+ })
+ testCase("/api/:day/:month?/:year?", []testparams{
+ {url: "/api/1", params: []string{"1", "", ""}, match: true},
+ {url: "/api/1/", params: []string{"1", "", ""}, match: true},
+ {url: "/api/1/2", params: []string{"1", "2", ""}, match: true},
+ {url: "/api/1/2/3", params: []string{"1", "2", "3"}, match: true},
+ {url: "/api/", params: nil, match: false},
+ })
+ testCase("/api/*", []testparams{
+ {url: "/api/", params: []string{""}, match: true},
+ {url: "/api/joker", params: []string{"joker"}, match: true},
+ {url: "/api", params: []string{""}, match: true},
+ {url: "/api/v1/entity", params: []string{"v1/entity"}, match: true},
+ {url: "/api2/v1/entity", params: nil, match: false},
+ {url: "/api_ignore/v1/entity", params: nil, match: false},
+ })
+ testCase("/api/*/:param?", []testparams{
+ {url: "/api/", params: []string{"", ""}, match: true},
+ {url: "/api/joker", params: []string{"joker", ""}, match: true},
+ {url: "/api/joker/batman", params: []string{"joker", "batman"}, match: true},
+ {url: "/api/joker/batman/robin", params: []string{"joker/batman", "robin"}, match: true},
+ {url: "/api/joker/batman/robin/1", params: []string{"joker/batman/robin", "1"}, match: true},
+ {url: "/api", params: []string{"", ""}, match: true},
+ })
+ testCase("/api/*/:param", []testparams{
+ {url: "/api/test/abc", params: []string{"test", "abc"}, match: true},
+ {url: "/api/joker/batman", params: []string{"joker", "batman"}, match: true},
+ {url: "/api/joker/batman/robin", params: []string{"joker/batman", "robin"}, match: true},
+ {url: "/api/joker/batman/robin/1", params: []string{"joker/batman/robin", "1"}, match: true},
+ {url: "/api", params: nil, match: false},
+ })
+ testCase("/api/*/:param/:param2", []testparams{
+ {url: "/api/test/abc", params: nil, match: false},
+ {url: "/api/joker/batman", params: nil, match: false},
+ {url: "/api/joker/batman/robin", params: []string{"joker", "batman", "robin"}, match: true},
+ {url: "/api/joker/batman/robin/1", params: []string{"joker/batman", "robin", "1"}, match: true},
+ {url: "/api/joker/batman/robin/1/2", params: []string{"joker/batman/robin", "1", "2"}, match: true},
+ {url: "/api", params: nil, match: false},
+ })
+ testCase("/", []testparams{
+ {url: "/api", params: nil, match: false},
+ {url: "", params: []string{}, match: true},
+ {url: "/", params: []string{}, match: true},
+ })
+ testCase("/config/abc.json", []testparams{
+ {url: "/config/abc.json", params: []string{}, match: true},
+ {url: "config/abc.json", params: nil, match: false},
+ {url: "/config/efg.json", params: nil, match: false},
+ {url: "/config", params: nil, match: false},
+ })
+ testCase("/config/*.json", []testparams{
+ {url: "/config/abc.json", params: []string{"abc.json"}, match: true},
+ {url: "/config/efg.json", params: []string{"efg.json"}, match: true},
+ //{url: "/config/efg.csv", params: nil, match: false},// doesn`t work, current: params: "efg.csv", true
+ {url: "config/abc.json", params: nil, match: false},
+ {url: "/config", params: nil, match: false},
+ })
+ testCase("/xyz", []testparams{
+ {url: "xyz", params: nil, match: false},
+ {url: "xyz/", params: nil, match: false},
+ })
+}
+
+// func Test_Utils_getTrimmedParam(t *testing.T) {
+// // TODO
+// }
+
+// func Test_Utils_getCharPos(t *testing.T) {
+// // TODO
+// }