Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into v3-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Aug 5, 2023
2 parents 41866cd + e91b02b commit 75bb02b
Show file tree
Hide file tree
Showing 177 changed files with 14,531 additions and 4,870 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ body:
value: |
### Notice
**This repository is not related to external or third-part Fiber modules. If you have a problem with them, open an issue under their repos. If you think the problem is related to Fiber, open the issue here.**
- Dont't forget you can ask your questions on our [Discord server](https://gofiber.io/discord).
- If you think Fiber doesn't have a nice feature that you think, open the issue with **✏️ Feature Request** template.
- Don't forget you can ask your questions in our [Discord server](https://gofiber.io/discord).
- If you have a suggestion for a Fiber feature you would like to see, open the issue with the **✏️ Feature Request** template.
- Write your issue with clear and understandable English.
- type: textarea
id: description
attributes:
label: "Bug Description"
description: "A clear and detailed description of what the bug is."
placeholder: "Explain your problem as clear and detailed."
placeholder: "Explain your problem clearly and in detail."
validations:
required: true
- type: textarea
Expand All @@ -39,7 +39,7 @@ body:
id: expected-behavior
attributes:
label: Expected Behavior
description: "A clear and detailed description of what you think should happens."
description: "A clear and detailed description of what you think should happen."
placeholder: "Tell us what Fiber should normally do."
validations:
required: true
Expand All @@ -56,7 +56,7 @@ body:
attributes:
label: "Code Snippet (optional)"
description: "For some issues, we need to know some parts of your code."
placeholder: "Share a code you think related to the issue."
placeholder: "Share a code snippet that you think is related to the issue."
render: go
value: |
package main
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ body:
attributes:
value: |
### Notice
- Dont't forget you can ask your questions on our [Discord server](https://gofiber.io/discord).
- If you think this is just a bug, open the issue with **☢️ Bug Report** template.
- Don't forget you can ask your questions in our [Discord server](https://gofiber.io/discord).
- If you think this is just a bug, open the issue with the **☢️ Bug Report** template.
- Write your issue with clear and understandable English.
- type: textarea
id: description
attributes:
label: "Feature Description"
description: "A clear and detailed description of the feature we need to do."
placeholder: "Explain your feature as clear and detailed."
description: "A clear and detailed description of the feature you would like to see added."
placeholder: "Explain your feature clearly, and in detail."
validations:
required: true
- type: textarea
Expand All @@ -31,7 +31,7 @@ body:
attributes:
label: "Code Snippet (optional)"
description: "Code snippet may be really helpful to describe some features."
placeholder: "Share a code to explain the feature better."
placeholder: "Share a code snippet to explain the feature better."
render: go
value: |
package main
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/question.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ body:
attributes:
value: |
### Notice
- Dont't forget you can ask your questions on our [Discord server](https://gofiber.io/discord).
- If you think this is just a bug, open the issue with **☢️ Bug Report** template.
- If you think Fiber doesn't have a nice feature that you think, open the issue with **✏️ Feature Request** template.
- Don't forget you can ask your questions in our [Discord server](https://gofiber.io/discord).
- If you think this is just a bug, open the issue with the **☢️ Bug Report** template.
- If you have a suggestion for a Fiber feature you would like to see, open the issue with the **✏️ Feature Request** template.
- Write your issue with clear and understandable English.
- type: textarea
id: description
attributes:
label: "Question Description"
description: "A clear and detailed description of the question."
placeholder: "Explain your question as clear and detailed."
placeholder: "Explain your question clearly, and in detail."
validations:
required: true
- type: textarea
id: snippet
attributes:
label: "Code Snippet (optional)"
description: "Code snippet may be really helpful to describe some features."
placeholder: "Share a code to explain the feature better."
placeholder: "Share a code snippet to explain the feature better."
render: go
value: |
package main
Expand Down
31 changes: 18 additions & 13 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<p align="center">
<a href="https://gofiber.io">
<img alt="Fiber" height="125" src="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo.svg">
<picture>
<source height="125" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo-dark.svg">
<img height="125" alt="Fiber" src="https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo.svg">
</picture>
</a>
<br>
<!-- base64 flags are available at https://www.phoca.cz/cssflags/ -->
Expand Down Expand Up @@ -61,6 +64,9 @@
<a href="https://github.com/gofiber/fiber/blob/master/.github/README_uk.md">
<img height="20px" src="https://img.shields.io/badge/UK-flag.svg?color=555555&style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDU1LjIgMzguNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTUuMiAzOC40IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWwoJLnN0MHtmaWxsOiNGRkQ1MDA7fQoJLnN0MXtmaWxsOiMwMDVCQkI7fQpdXT48L3N0eWxlPjxnPjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0zLjAzLDBoNDkuMTNjMS42NywwLDMuMDMsMS4zNiwzLjAzLDMuMDN2MzIuMzNjMCwxLjY3LTEuMzcsMy4wMy0zLjAzLDMuMDNIMy4wM0MxLjM3LDM4LjQsMCwzNy4wNCwwLDM1LjM3IFYzLjAzQzAsMS4zNiwxLjM3LDAsMy4wMywwTDMuMDMsMHoiLz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNMCwxOS4yaDU1LjJ2MTYuMTdjMCwxLjY3LTEuMzcsMy4wMy0zLjAzLDMuMDNIMy4wM0MxLjM3LDM4LjQsMCwzNy4wNCwwLDM1LjM3VjE5LjJMMCwxOS4yeiIvPjwvZz48L3N2Zz4=">
</a>
<a href="https://github.com/gofiber/fiber/blob/master/.github/README_az.md">
<img height="20px" src="https://img.shields.io/badge/AZ-flag.svg?color=555555&style=flat-square&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTIwMCIgaGVpZ2h0PSI2MDAiPg0KPHJlY3Qgd2lkdGg9IjEyMDAiIGhlaWdodD0iNjAwIiBmaWxsPSIjNTA5ZTJmIi8+DQo8cmVjdCB3aWR0aD0iMTIwMCIgaGVpZ2h0PSI0MDAiIGZpbGw9IiNlZjMzNDAiLz4NCjxyZWN0IHdpZHRoPSIxMjAwIiBoZWlnaHQ9IjIwMCIgZmlsbD0iIzAwYjVlMiIvPg0KPGNpcmNsZSBjeD0iNTcwIiBjeT0iMzAwIiByPSI5MCIgZmlsbD0iI2ZmZiIvPg0KPGNpcmNsZSBjeD0iNTkwIiBjeT0iMzAwIiByPSI3NSIgZmlsbD0iI2VmMzM0MCIvPg0KPHBhdGggZD0iTTY3MCAyNTBsOS41NjcgMjYuOTAzIDI1Ljc4OC0xMi4yNTgtMTIuMjU4IDI1Ljc4OEw3MjAgMzAwbC0yNi45MDMgOS41NjcgMTIuMjU4IDI1Ljc4OC0yNS43ODgtMTIuMjU4TDY3MCAzNTBsLTkuNTY3LTI2LjkwMy0yNS43ODggMTIuMjU4IDEyLjI1OC0yNS43ODhMNjIwIDMwMGwyNi45MDMtOS41NjctMTIuMjU4LTI1Ljc4OCAyNS43ODggMTIuMjU4eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+">
</a>
<br>
<a href="https://pkg.go.dev/github.com/gofiber/fiber/v3#pkg-overview">
<img src="https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat-square">
Expand Down Expand Up @@ -118,7 +124,7 @@ These tests are performed by [TechEmpower](https://www.techempower.com/benchmark

## ⚙️ Installation

Make sure you have Go installed ([download](https://go.dev/dl/)). Version `1.16` or higher is required.
Make sure you have Go installed ([download](https://go.dev/dl/)). Version `1.17` or higher is required.

Initialize your project by creating a folder and then running `go mod init github.com/your/repo` ([learn more](https://go.dev/blog/using-go-modules)) inside the folder. Then install Fiber with the [`go get`](https://pkg.go.dev/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) command:

Expand All @@ -128,12 +134,12 @@ go get -u github.com/gofiber/fiber/v3

## 🎯 Features

- Robust [routing](https://docs.gofiber.io/routing)
- Robust [routing](https://docs.gofiber.io/guide/routing)
- Serve [static files](https://docs.gofiber.io/api/app#static)
- Extreme [performance](https://docs.gofiber.io/extra/benchmarks)
- [Low memory](https://docs.gofiber.io/extra/benchmarks) footprint
- [API endpoints](https://docs.gofiber.io/api/ctx)
- [Middleware](https://docs.gofiber.io/middleware) & [Next](https://docs.gofiber.io/api/ctx#next) support
- [Middleware](https://docs.gofiber.io/category/-middleware) & [Next](https://docs.gofiber.io/api/ctx#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://github.com/gofiber/template)
- [WebSocket support](https://github.com/gofiber/websocket)
Expand All @@ -151,7 +157,7 @@ Fiber is **inspired** by Express, the most popular web framework on the Internet
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.

## ⚠️ Limitations
* Due to Fiber's usage of unsafe, the library may not always be compatible with the latest Go version. Fiber 2.40.0 has been tested with Go versions 1.16 to 1.20.
* Due to Fiber's usage of unsafe, the library may not always be compatible with the latest Go version. Fiber 2.40.0 has been tested with Go versions 1.17 to 1.20.
* Fiber is not compatible with net/http interfaces. This means you will not be able to use projects like gqlgen, go-swagger, or any others which are part of the net/http ecosystem.

## 👀 Examples
Expand Down Expand Up @@ -440,7 +446,7 @@ func main() {

### JSON Response

📖 [JSON](https://docs.gofiber.io/ctx#json)
📖 [JSON](https://docs.gofiber.io/api/ctx#json)

```go
type User struct {
Expand Down Expand Up @@ -582,7 +588,7 @@ func main() {
app := fiber.New(fiber.Config{
EnableTrustedProxyCheck: true,
TrustedProxies: []string{"0.0.0.0", "1.1.1.1/30"}, // IP address or IP address range
ProxyHeader: fiber.HeaderXForwardedFor},
ProxyHeader: fiber.HeaderXForwardedFor,
})

// ...
Expand Down Expand Up @@ -619,20 +625,20 @@ Here is a list of middleware that are included within the Fiber framework.
| [requestid](https://github.com/gofiber/fiber/tree/master/middleware/requestid) | Adds a requestid to every request. |
| [session](https://github.com/gofiber/fiber/tree/master/middleware/session) | Session middleware. NOTE: This middleware uses our Storage package. |
| [skip](https://github.com/gofiber/fiber/tree/master/middleware/skip) | Skip middleware that skips a wrapped handler if a predicate is true. |
| [rewrite](https://github.com/gofiber/rewrite) | Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links. |
| [timeout](https://github.com/gofiber/fiber/tree/master/middleware/timeout) | Adds a max time for a request and forwards to ErrorHandler if it is exceeded. |
| [adaptor](https://github.com/gofiber/adaptor) | Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn! |
| [helmet](https://github.com/gofiber/helmet) | Helps secure your apps by setting various HTTP headers. |
| [redirect](https://github.com/gofiber/redirect) | Redirect middleware |
| [keyauth](https://github.com/gofiber/keyauth) | Key auth middleware provides a key based authentication. |

## 🧬 External Middleware

List of externally hosted middleware modules and maintained by the [Fiber team](https://github.com/orgs/gofiber/people).

| Middleware | Description |
| :------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [adaptor](https://github.com/gofiber/adaptor) | Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn! |
| [helmet](https://github.com/gofiber/helmet) | Helps secure your apps by setting various HTTP headers. |
| [jwt](https://github.com/gofiber/jwt) | JWT returns a JSON Web Token \(JWT\) auth middleware. |
| [keyauth](https://github.com/gofiber/keyauth) | Key auth middleware provides a key based authentication. |
| [redirect](https://github.com/gofiber/redirect) | Redirect middleware |
| [rewrite](https://github.com/gofiber/rewrite) | Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links. |
| [storage](https://github.com/gofiber/storage) | Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. |
| [template](https://github.com/gofiber/template) | This package contains 8 template engines that can be used with Fiber `v1.10.x` Go version 1.13 or higher is required. |
| [websocket](https://github.com/gofiber/websocket) | Based on Fasthttp WebSocket for Fiber with Locals support! |
Expand Down Expand Up @@ -694,7 +700,6 @@ Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](
- [runewidth](https://github.com/mattn/go-runewidth/blob/master/LICENSE)
- [fasthttp](https://github.com/valyala/fasthttp/blob/master/LICENSE)
- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
- [dictpool](https://github.com/savsgio/dictpool/blob/master/LICENSE)
- [fwd](https://github.com/philhofer/fwd/blob/master/LICENSE.md)
- [go-ole](https://github.com/go-ole/go-ole/blob/master/LICENSE)
- [gopsutil](https://github.com/shirou/gopsutil/blob/master/LICENSE)
Expand Down
Loading

0 comments on commit 75bb02b

Please sign in to comment.