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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user