1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 13:35:59 +00:00

New feature: Fallback views. Read HISTORY.md

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-01-24 14:08:37 +02:00
parent a2588e480d
commit 435f284815
16 changed files with 316 additions and 44 deletions

View File

@@ -252,6 +252,24 @@ var (
Ace = view.Ace
)
type (
// ErrViewNotExist reports whether a template was not found in the parsed templates tree.
ErrViewNotExist = context.ErrViewNotExist
// FallbackViewFunc is a function that can be registered
// to handle view fallbacks. It accepts the Context and
// a special error which contains information about the previous template error.
// It implements the FallbackViewProvider interface.
//
// See `Context.View` method.
FallbackViewFunc = context.FallbackViewFunc
// FallbackView is a helper to register a single template filename as a fallback
// when the provided tempate filename was not found.
FallbackView = context.FallbackView
// FallbackViewLayout is a helper to register a single template filename as a fallback
// layout when the provided layout filename was not found.
FallbackViewLayout = context.FallbackViewLayout
)
// PrefixDir returns a new FileSystem that opens files
// by adding the given "prefix" to the directory tree of "fs".
//