From db66c2344853189326a8daca530dee8b5ded035c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vic=20Sh=C3=B3stak?= Date: Thu, 6 Feb 2020 01:10:23 +0300 Subject: [PATCH 1/6] Fix image links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8819ebae..2005104a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 🚀 Fiber ru ch +# 🚀 Fiber ru ch [![](https://img.shields.io/github/release/gofiber/fiber)](https://github.com/gofiber/fiber/releases) ![](https://img.shields.io/github/languages/top/gofiber/fiber) [![](https://godoc.org/github.com/gofiber/fiber?status.svg)](https://godoc.org/github.com/gofiber/fiber) ![](https://goreportcard.com/badge/github.com/gofiber/fiber) [![GitHub license](https://img.shields.io/github/license/gofiber/fiber.svg)](https://github.com/gofiber/fiber/blob/master/LICENSE) [![Join the chat at https://gitter.im/gofiber/community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gofiber/community) -Fiber logo +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. From 5e763001d257a6b3ba90913c3f52c81dc80efce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vic=20Sh=C3=B3stak?= Date: Thu, 6 Feb 2020 01:11:25 +0300 Subject: [PATCH 2/6] Fix image links (RU) --- README_RU.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_RU.md b/README_RU.md index d77ef283..79dceb4a 100644 --- a/README_RU.md +++ b/README_RU.md @@ -1,8 +1,8 @@ -# 🚀 Fiber en ch +# 🚀 Fiber en ch [![](https://img.shields.io/github/release/gofiber/fiber)](https://github.com/gofiber/fiber/releases) ![](https://img.shields.io/github/languages/top/gofiber/fiber) [![](https://godoc.org/github.com/gofiber/fiber?status.svg)](https://godoc.org/github.com/gofiber/fiber) ![](https://goreportcard.com/badge/github.com/gofiber/fiber) [![GitHub license](https://img.shields.io/github/license/gofiber/fiber.svg)](https://github.com/gofiber/fiber/blob/master/LICENSE) [![Join the chat at https://gitter.im/gofiber/community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gofiber/community) -Fiber logo +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. From 0a21e212c0305ce977984ee600fa1e17182cf5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vic=20Sh=C3=B3stak?= Date: Thu, 6 Feb 2020 01:12:07 +0300 Subject: [PATCH 3/6] Fix image links (CH) --- README_CH.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_CH.md b/README_CH.md index 1c6bb6e3..abee1c62 100644 --- a/README_CH.md +++ b/README_CH.md @@ -1,8 +1,8 @@ -# 🚀 Fiber en ru +# 🚀 Fiber en ru [![](https://img.shields.io/github/release/gofiber/fiber)](https://github.com/gofiber/fiber/releases) ![](https://img.shields.io/github/languages/top/gofiber/fiber) [![](https://godoc.org/github.com/gofiber/fiber?status.svg)](https://godoc.org/github.com/gofiber/fiber) ![](https://goreportcard.com/badge/github.com/gofiber/fiber) [![GitHub license](https://img.shields.io/github/license/gofiber/fiber.svg)](https://github.com/gofiber/fiber/blob/master/LICENSE) [![Join the chat at https://gitter.im/gofiber/community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gofiber/community) -Fiber logo +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. From 66574548f1ec6385aa8d077ef2708a8a98d2cac2 Mon Sep 17 00:00:00 2001 From: Bhavesh Gupta Date: Thu, 6 Feb 2020 15:35:58 +0000 Subject: [PATCH 4/6] Small correction in docs with license link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2005104a..0366a942 100644 --- a/README.md +++ b/README.md @@ -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). From 04b71164e69c8e5c0edb2c18ecd501bb23029869 Mon Sep 17 00:00:00 2001 From: Bhavesh Gupta Date: Thu, 6 Feb 2020 15:38:33 +0000 Subject: [PATCH 5/6] Update README_CH.md --- README_CH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CH.md b/README_CH.md index abee1c62..ea1467aa 100644 --- a/README_CH.md +++ b/README_CH.md @@ -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). From ce4f573564cd5fb74d50d647a2c583c38c1c859e Mon Sep 17 00:00:00 2001 From: KoyamaSohei Date: Fri, 7 Feb 2020 01:35:00 +0900 Subject: [PATCH 6/6] Fix panic on serving not-exists dir --- static.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static.go b/static.go index 6463b759..4de39730 100644 --- a/static.go +++ b/static.go @@ -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 {