mirror of https://github.com/gofiber/fiber.git
Merge remote-tracking branch 'upstream/master'
commit
b69d99b2ac
|
@ -1,8 +1,8 @@
|
|||
# 🚀 Fiber <a href="README_RU.md"><img width="20px" src="docs/static/flags/ru.svg" alt="ru"/></a> <a href="README_CH.md"><img width="20px" src="docs/static/flags/ch.svg" alt="ch"/></a>
|
||||
# 🚀 Fiber <a href="README_RU.md"><img width="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/ru.svg" alt="ru"/></a> <a href="README_CH.md"><img width="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/ch.svg" alt="ch"/></a>
|
||||
|
||||
[](https://github.com/gofiber/fiber/releases)  [](https://godoc.org/github.com/gofiber/fiber)  [](https://github.com/gofiber/fiber/blob/master/LICENSE) [](https://gitter.im/gofiber/community)
|
||||
|
||||
<img align="right" height="180px" src="docs/static/logo_320px_trans.png" alt="Fiber logo" />
|
||||
<img align="right" height="180px" src="https://github.com/gofiber/docs/blob/master/static/logo_320px_trans.png" alt="Fiber logo" />
|
||||
|
||||
**[Fiber](https://github.com/gofiber/fiber)** is an [Express.js](https://expressjs.com/en/4x/api.html) styled HTTP web framework implementation running on [Fasthttp](https://github.com/valyala/fasthttp), the **fastest** HTTP engine for Go (Golang). The package make use of **similar framework convention** as they are in Express.
|
||||
|
||||
|
@ -150,4 +150,4 @@ Thanks for your support! 😘 Together, we make `Fiber`.
|
|||
|
||||
## License
|
||||
|
||||
⚠️ _Please note:_ `gofiber/fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/edit/master/LICENSE).
|
||||
⚠️ _Please note:_ `gofiber/fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/master/LICENSE).
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# 🚀 Fiber <a href="README.md"><img width="20px" src="docs/static/flags/en.svg" alt="en"/></a> <a href="README_RU.md"><img width="20px" src="docs/static/flags/ru.svg" alt="ru"/></a>
|
||||
# 🚀 Fiber <a href="README.md"><img width="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/en.svg" alt="en"/></a> <a href="README_RU.md"><img width="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/ru.svg" alt="ru"/></a>
|
||||
|
||||
[](https://github.com/gofiber/fiber/releases)  [](https://godoc.org/github.com/gofiber/fiber)  [](https://github.com/gofiber/fiber/blob/master/LICENSE) [](https://gitter.im/gofiber/community)
|
||||
|
||||
<img align="right" height="180px" src="docs/static/logo_320px_trans.png" alt="Fiber logo" />
|
||||
<img align="right" height="180px" src="https://github.com/gofiber/docs/blob/master/static/logo_320px_trans.png" alt="Fiber logo" />
|
||||
|
||||
**[Fiber](https://github.com/gofiber/fiber)** 是一个 [Express.js](https://expressjs.com/en/4x/api.html) 运行的样式化HTTP Web框架实现 [Fasthttp](https://github.com/valyala/fasthttp), **最快的** HTTP引擎 Go (Golang). 该软件包使用了**相似的框架约定** Express.
|
||||
|
||||
|
@ -150,4 +150,4 @@ func main() {
|
|||
|
||||
## License
|
||||
|
||||
⚠️ _请注意:_ `gofiber/fiber` 是根据以下条款获得许可的免费开源软件 [MIT License](https://github.com/gofiber/fiber/edit/master/LICENSE).
|
||||
⚠️ _请注意:_ `gofiber/fiber` 是根据以下条款获得许可的免费开源软件 [MIT License](https://github.com/gofiber/fiber/master/LICENSE).
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# 🚀 Fiber <a href="README.md"><img width="20px" src="docs/static/flags/en.svg" alt="en"/></a> <a href="README_CH.md"><img width="20px" src="docs/static/flags/ch.svg" alt="ch"/></a>
|
||||
# 🚀 Fiber <a href="README.md"><img width="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/en.svg" alt="en"/></a> <a href="README_CH.md"><img width="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/ch.svg" alt="ch"/></a>
|
||||
|
||||
[](https://github.com/gofiber/fiber/releases)  [](https://godoc.org/github.com/gofiber/fiber)  [](https://github.com/gofiber/fiber/blob/master/LICENSE) [](https://gitter.im/gofiber/community)
|
||||
|
||||
<img align="right" height="180px" src="docs/static/logo_320px_trans.png" alt="Fiber logo" />
|
||||
<img align="right" height="180px" src="https://github.com/gofiber/docs/blob/master/static/logo_320px_trans.png" alt="Fiber logo" />
|
||||
|
||||
**[Fiber](https://github.com/gofiber/fiber)** — это [Express.js](https://expressjs.com/en/4x/api.html) подобный HTTP веб фреймворк, использующий всю мощь [Fasthttp](https://github.com/valyala/fasthttp), самого **быстрого** HTTP движка для Go (Golang). Мы используем **аналогичную** схему именования методов, как и у Express.
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ package fiber
|
|||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
@ -36,6 +37,11 @@ func (r *Fiber) Static(args ...string) {
|
|||
wildcard = true
|
||||
}
|
||||
|
||||
// Check if root exists
|
||||
if _, err := os.Lstat(root); err != nil {
|
||||
log.Fatal("Static: ", err)
|
||||
}
|
||||
|
||||
// Lets get all files from root
|
||||
files, _, err := getFiles(root)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue