add FS func in HTMLEngine (#2304)

Signed-off-by: aveyuan <aveyuan@osblog.cn>
This commit is contained in:
aveyuan 2023-12-13 06:01:10 +08:00 committed by GitHub
parent 3061191ebd
commit 7ffe4010b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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