Browse Source

Platform agnostic pathing.

Wirecog, LLC 3 years ago
parent
commit
e6f8829b2c
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      templatebundle.go

+ 1
- 1
templatebundle.go View File

@@ -36,7 +36,7 @@ func (t *TemplateBundle) importTemplateFileContents(templatesPath string) error
36 36
 
37 37
 	if err := filepath.Walk(templateDirectory, func(path string, info os.FileInfo, err error) error {
38 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 40
 			contents, err := ioutil.ReadFile(path)
41 41
 			t.items[name] = string(contents)
42 42