mirror of
https://github.com/aykhans/oh-my-url.git
synced 2025-04-17 02:23:13 +00:00
20 lines
334 B
Go
20 lines
334 B
Go
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
|
|
}
|