1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-07 20:17:05 +00:00

Full support of the http.FileSystem on all view engines as requested at #1575

Also, the HandleDir accepts both string and http.FileSystem (interface{}) (like the view's fs)
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-05 08:34:09 +03:00
parent 7e6d453dad
commit e1f25eb098
50 changed files with 1613 additions and 1226 deletions

View File

@@ -1,8 +1,6 @@
package router
import (
"net/http"
"github.com/kataras/iris/v12/context"
"github.com/kataras/iris/v12/macro"
@@ -201,8 +199,13 @@ type Party interface {
//
// Returns all the registered routes, including GET index and path patterm and HEAD.
//
// Examples can be found at: https://github.com/kataras/iris/tree/master/_examples/file-server
HandleDir(requestPath string, fs http.FileSystem, opts ...DirOptions) []*Route
// Usage:
// HandleDir("/public", "./assets", DirOptions{...}) or
// HandleDir("/public", iris.Dir("./assets"), DirOptions{...})
//
// Examples:
// https://github.com/kataras/iris/tree/master/_examples/file-server
HandleDir(requestPath string, fileSystem interface{}, opts ...DirOptions) []*Route
// None registers an "offline" route
// see context.ExecRoute(routeName) and