mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 12:31:58 +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:
15
view/view.go
15
view/view.go
@@ -19,6 +19,21 @@ type (
|
||||
EngineFuncer = context.ViewEngineFuncer
|
||||
)
|
||||
|
||||
// ErrNotExist reports whether a template was not found in the parsed templates tree.
|
||||
type ErrNotExist struct {
|
||||
Name string
|
||||
IsLayout bool
|
||||
}
|
||||
|
||||
// Error implements the `error` interface.
|
||||
func (e ErrNotExist) Error() string {
|
||||
title := "template"
|
||||
if e.IsLayout {
|
||||
title = "layout"
|
||||
}
|
||||
return fmt.Sprintf("%s '%s' does not exist", title, e.Name)
|
||||
}
|
||||
|
||||
// View is responsible to
|
||||
// load the correct templates
|
||||
// for each of the registered view engines.
|
||||
|
||||
Reference in New Issue
Block a user