🎉 first commit

This commit is contained in:
2024-01-19 16:11:54 +04:00
commit f59cb4f927
22 changed files with 667 additions and 0 deletions

19
app/utils/templates.go Normal file
View File

@ -0,0 +1,19 @@
package utils
import (
"os"
"path/filepath"
)
func GetTemplatePaths(filenames ...string) []string {
dir, err := os.Getwd()
if err != nil {
panic(err)
}
templatePath := filepath.Join(dir, "app", "templates")
for i, filename := range filenames {
filenames[i] = filepath.Join(templatePath, filename)
}
return filenames
}