|
|
|
|
36
|
|
36
|
|
37
|
if err := filepath.Walk(templateDirectory, func(path string, info os.FileInfo, err error) error {
|
37
|
if err := filepath.Walk(templateDirectory, func(path string, info os.FileInfo, err error) error {
|
38
|
if strings.HasSuffix(path, TemplateFileExtension) {
|
38
|
if strings.HasSuffix(path, TemplateFileExtension) {
|
39
|
- name := strings.TrimSuffix(strings.TrimPrefix(path, templateDirectory+string(os.PathSeparator)), TemplateFileExtension)
|
|
|
|
|
39
|
+ name := strings.TrimSuffix(strings.TrimPrefix(path, templateDirectory+"/"), TemplateFileExtension)
|
40
|
contents, err := ioutil.ReadFile(path)
|
40
|
contents, err := ioutil.ReadFile(path)
|
41
|
t.items[name] = string(contents)
|
41
|
t.items[name] = string(contents)
|
42
|
|
42
|
|