diff options
Diffstat (limited to 'internal/builder/template.go')
-rw-r--r-- | internal/builder/template.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/builder/template.go b/internal/builder/template.go index 53199fc..5ec963a 100644 --- a/internal/builder/template.go +++ b/internal/builder/template.go @@ -21,9 +21,9 @@ import ( ) var ( - css string - templates = make(map[string]*os.File) - nsMap = map[string]string{ + css string + templateFiles = make(map[string]*os.File) + nsMap = map[string]string{ "xsl": "http://www.w3.org/1999/XSL/Transform", "atom": "http://www.w3.org/2005/Atom", "xhtml": "http://www.w3.org/1999/xhtml", @@ -39,14 +39,14 @@ func loadCSS() { } func loadTemplate(path string) (file *os.File, err error) { - if templates[path] == nil { + if templateFiles[path] == nil { file, err = os.OpenFile(path, os.O_RDONLY, 0) if err != nil { return nil, errors.Wrapf(err, "could not load template at path %s", path) } - templates[path] = file + templateFiles[path] = file } - file = templates[path] + file = templateFiles[path] return } |