port template engine

This commit is contained in:
orangix
2026-01-19 05:31:43 +01:00
parent 33fa04e98d
commit 3f40c25b04
4 changed files with 115 additions and 120 deletions

15
utils/readFile.go Normal file
View File

@@ -0,0 +1,15 @@
package utils
import (
"io"
"io/fs"
)
func ReadFile(path string, fs fs.FS) ([]byte, error) {
file, err := fs.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
return io.ReadAll(file)
}