Skip to content
Permalink
Browse files

tpl: Fix strings.HasPrefix args order

  • Loading branch information...
quasilyte authored and bep committed Feb 2, 2019
1 parent 5383fe4 commit 7201042946dde78d5ea4fea9cb006fb4dded55c1
Showing with 2 additions and 2 deletions.
  1. +1 −1 tpl/partials/partials.go
  2. +1 −1 tpl/tplimpl/templateFuncster.go
@@ -65,7 +65,7 @@ type Namespace struct {
// Include executes the named partial and returns either a string,
// when the partial is a text/template, or template.HTML when html/template.
func (ns *Namespace) Include(name string, contextList ...interface{}) (interface{}, error) {
if strings.HasPrefix("partials/", name) {
if strings.HasPrefix(name, "partials/") {
name = name[8:]
}
var context interface{}
@@ -39,7 +39,7 @@ func newTemplateFuncster(deps *deps.Deps) *templateFuncster {
// Partial executes the named partial and returns either a string,
// when called from text/template, for or a template.HTML.
func (t *templateFuncster) partial(name string, contextList ...interface{}) (interface{}, error) {
if strings.HasPrefix("partials/", name) {
if strings.HasPrefix(name, "partials/") {
name = name[8:]
}
var context interface{}

0 comments on commit 7201042

Please sign in to comment.
You can’t perform that action at this time.