diff --git a/internal/models/templatecache.go b/internal/models/templatecache.go index 4da6c13..bd4690a 100644 --- a/internal/models/templatecache.go +++ b/internal/models/templatecache.go @@ -20,9 +20,9 @@ type TemplateCacheItem struct { } // Execute writes the template to the supplied writer using the supplied data. -func (self *TemplateCacheItem) Execute(d *TemplateData, w http.ResponseWriter) error { +func (item *TemplateCacheItem) Execute(d *TemplateData, w http.ResponseWriter) error { buf := new(bytes.Buffer) - err := self.Template.Execute(buf, d) + err := item.Template.Execute(buf, d) if err != nil { return err } diff --git a/internal/render/render.go b/internal/render/render.go index 5513cc7..ee01306 100644 --- a/internal/render/render.go +++ b/internal/render/render.go @@ -85,7 +85,7 @@ func GetTemplateFromCache(filename string) (*models.TemplateCacheItem, error) { if template, ok := app.TemplateCache.Cache[filename]; ok { return &template, nil } else { - return &models.TemplateCacheItem{}, errors.New("Couldn't load template from cache") + return &models.TemplateCacheItem{}, errors.New("couldn't load template from cache") } } diff --git a/internal/td/td.go b/internal/td/td.go index c7e47d5..9f9fec1 100644 --- a/internal/td/td.go +++ b/internal/td/td.go @@ -49,5 +49,5 @@ func LoadTemplateData(page string) (models.TemplateData, error) { } // couldn't load anything from file - return models.TemplateData{}, errors.New("Couldn't load data from file") + return models.TemplateData{}, errors.New("couldn't load data from file") }