Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-03-24 12:11:16 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-03-24 18:14:51 +0300
commitb5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7 (patch)
treecf23180dc07698391cf47c2fe525755417729020 /tpl/template.go
parent3011f36c27ecde309325e6c75ca377f4f87fa97a (diff)
all: Apply staticcheck recommendations
Diffstat (limited to 'tpl/template.go')
-rw-r--r--tpl/template.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tpl/template.go b/tpl/template.go
index 07152166a..01f79c407 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -152,7 +152,7 @@ func (t *TemplateAdapter) Execute(w io.Writer, data interface{}) (execErr error)
// Panics in templates are a little bit too common (nil pointers etc.)
// See https://github.com/gohugoio/hugo/issues/5327
if r := recover(); r != nil {
- execErr = t.addFileContext(t.Name(), fmt.Errorf(`panic in Execute: %s. See "https://github.com/gohugoio/hugo/issues/5327" for the reason why we cannot provide a better error message for this.`, r))
+ execErr = t.addFileContext(t.Name(), fmt.Errorf(`panic in Execute: %s. See "https://github.com/gohugoio/hugo/issues/5327" for the reason why we cannot provide a better error message for this`, r))
}
}()
@@ -174,7 +174,7 @@ func (t *TemplateAdapter) TemplateInfo() Info {
// The identifiers may be truncated in the log, e.g.
// "executing "main" at <$scaled.SRelPermalin...>: can't evaluate field SRelPermalink in type *resource.Image"
-var identifiersRe = regexp.MustCompile("at \\<(.*?)(\\.{3})?\\>:")
+var identifiersRe = regexp.MustCompile(`at \<(.*?)(\.{3})?\>:`)
func (t *TemplateAdapter) extractIdentifiers(line string) []string {
m := identifiersRe.FindAllStringSubmatch(line, -1)