mirror of
https://github.com/kataras/iris.git
synced 2025-12-24 05:17:03 +00:00
directly support embed.FS and fs.FS on view engines
This commit is contained in:
@@ -805,6 +805,13 @@ func (cp *ContextPatches) SetCookieKVExpiration(patch time.Duration) {
|
||||
context.SetCookieKVExpiration = patch
|
||||
}
|
||||
|
||||
// ResolveFS modifies the default way to resolve a filesystem by any type of value.
|
||||
// It affects the view engine filesystem resolver
|
||||
// and the Application's API Builder's `HandleDir` method.
|
||||
func (cp *ContextPatches) ResolveFS(patchFunc func(fsOrDir interface{}) http.FileSystem) {
|
||||
context.ResolveFS = patchFunc
|
||||
}
|
||||
|
||||
// ContextWriterPatches features the context's writers patches.
|
||||
type ContextWriterPatches struct{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user