From 7ffe4010b9578873c976fefac3656e43729dbf24 Mon Sep 17 00:00:00 2001 From: aveyuan Date: Wed, 13 Dec 2023 06:01:10 +0800 Subject: [PATCH] add FS func in HTMLEngine (#2304) Signed-off-by: aveyuan --- view/html.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/view/html.go b/view/html.go index c6b10403..41dcbebc 100644 --- a/view/html.go +++ b/view/html.go @@ -104,6 +104,12 @@ func (s *HTMLEngine) RootDir(root string) *HTMLEngine { return s } +// FS change templates DIR +func (s *HTMLEngine) FS(dirOrFS interface{}) *HTMLEngine { + s.fs = getFS(dirOrFS) + return s +} + // Name returns the engine's name. func (s *HTMLEngine) Name() string { return s.name