mirror of
https://github.com/kataras/iris.git
synced 2026-01-11 14:05:59 +00:00
New feature: Fallback views. Read HISTORY.md
This commit is contained in:
14
view/view.go
14
view/view.go
@@ -21,19 +21,7 @@ type (
|
||||
)
|
||||
|
||||
// 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)
|
||||
}
|
||||
type ErrNotExist = context.ErrViewNotExist
|
||||
|
||||
// View is just a wrapper on top of the registered template engine.
|
||||
type View struct{ Engine }
|
||||
|
||||
Reference in New Issue
Block a user