mirror of
https://github.com/aykhans/oh-my-url.git
synced 2025-07-05 17:52:36 +00:00
🎉 first commit
This commit is contained in:
19
app/utils/templates.go
Normal file
19
app/utils/templates.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user