This commit is contained in:
2025-06-12 02:17:31 +10:00
parent b5fcbab1a5
commit da9a17201b
61 changed files with 1362 additions and 1106 deletions

View File

@ -4,13 +4,11 @@ import (
"errors"
"io"
"os"
"path/filepath"
)
func LoadTemplate(template string) ([]byte, error) {
tPath := filepath.Join("templates", template)
if _, err := os.Stat(tPath); err == nil {
file, err := os.Open(tPath)
func LoadTemplate(templatePath string) ([]byte, error) {
if _, err := os.Stat(templatePath); err == nil {
file, err := os.Open(templatePath)
if err != nil {
return nil, err
}