mirror of https://github.com/gofiber/fiber.git
commit
62bfc83ef1
|
@ -9,6 +9,7 @@ package fiber
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
@ -36,6 +37,11 @@ func (r *Fiber) Static(args ...string) {
|
||||||
wildcard = true
|
wildcard = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if root exists
|
||||||
|
if _, err := os.Lstat(root); err != nil {
|
||||||
|
log.Fatal("Static: ", err)
|
||||||
|
}
|
||||||
|
|
||||||
// Lets get all files from root
|
// Lets get all files from root
|
||||||
files, _, err := getFiles(root)
|
files, _, err := getFiles(root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue