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:
authordigitalcraftsman <digitalcraftsman@protonmail.com>2016-03-25 00:56:50 +0300
committerdigitalcraftsman <digitalcraftsman@protonmail.com>2016-03-25 00:56:50 +0300
commit7fa2cec906a2b4fa9bc7afd72111b27e316c65fb (patch)
tree41b2039aa95bf7f4f4f44e07f04819724632b3fc /tpl/template.go
parentb71f391cd745f432436841a67696f62a48e99da8 (diff)
tpl: Small Golint fixes
Diffstat (limited to 'tpl/template.go')
-rw-r--r--tpl/template.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/tpl/template.go b/tpl/template.go
index 54e16fcd2..9266fc8d4 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -101,16 +101,16 @@ func New() Template {
return templates
}
-func partial(name string, context_list ...interface{}) template.HTML {
+func partial(name string, contextList ...interface{}) template.HTML {
if strings.HasPrefix("partials/", name) {
name = name[8:]
}
var context interface{}
- if len(context_list) == 0 {
+ if len(contextList) == 0 {
context = nil
} else {
- context = context_list[0]
+ context = contextList[0]
}
return ExecuteTemplateToHTML(context, "partials/"+name, "theme/partials/"+name)
}
@@ -199,9 +199,8 @@ func (t *GoHTMLTemplate) checkState() {
func (t *GoHTMLTemplate) AddInternalTemplate(prefix, name, tpl string) error {
if prefix != "" {
return t.AddTemplate("_internal/"+prefix+"/"+name, tpl)
- } else {
- return t.AddTemplate("_internal/"+name, tpl)
}
+ return t.AddTemplate("_internal/"+name, tpl)
}
func (t *GoHTMLTemplate) AddInternalShortcode(name, content string) error {