mirror of
https://github.com/kataras/iris.git
synced 2026-01-03 10:17:03 +00:00
New feature: Fallback views. Read HISTORY.md
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
package context
|
||||
|
||||
import "io"
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
// ErrViewNotExist it's an error.
|
||||
// It reports whether a template was not found in the parsed templates tree.
|
||||
type ErrViewNotExist struct {
|
||||
Name string
|
||||
IsLayout bool
|
||||
Data interface{}
|
||||
}
|
||||
|
||||
// Error completes the `error` interface.
|
||||
func (e ErrViewNotExist) Error() string {
|
||||
title := "template"
|
||||
if e.IsLayout {
|
||||
title = "layout"
|
||||
}
|
||||
return fmt.Sprintf("%s '%s' does not exist", title, e.Name)
|
||||
}
|
||||
|
||||
// ViewEngine is the interface which all view engines should be implemented in order to be registered inside iris.
|
||||
type ViewEngine interface {
|
||||
|
||||
Reference in New Issue
Block a user