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
path: root/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tpl')
-rw-r--r--tpl/collections/collections.go10
-rw-r--r--tpl/fmt/fmt.go2
-rw-r--r--tpl/images/images.go1
3 files changed, 7 insertions, 6 deletions
diff --git a/tpl/collections/collections.go b/tpl/collections/collections.go
index 8f09097a7..34b8e7f77 100644
--- a/tpl/collections/collections.go
+++ b/tpl/collections/collections.go
@@ -503,25 +503,25 @@ func (i *intersector) appendIfNotSeen(v reflect.Value) {
}
}
-func (ins *intersector) handleValuePair(l1vv, l2vv reflect.Value) {
+func (i *intersector) handleValuePair(l1vv, l2vv reflect.Value) {
switch kind := l1vv.Kind(); {
case kind == reflect.String:
l2t, err := toString(l2vv)
if err == nil && l1vv.String() == l2t {
- ins.appendIfNotSeen(l1vv)
+ i.appendIfNotSeen(l1vv)
}
case isNumber(kind):
f1, err1 := numberToFloat(l1vv)
f2, err2 := numberToFloat(l2vv)
if err1 == nil && err2 == nil && f1 == f2 {
- ins.appendIfNotSeen(l1vv)
+ i.appendIfNotSeen(l1vv)
}
case kind == reflect.Ptr, kind == reflect.Struct:
if l1vv.Interface() == l2vv.Interface() {
- ins.appendIfNotSeen(l1vv)
+ i.appendIfNotSeen(l1vv)
}
case kind == reflect.Interface:
- ins.handleValuePair(reflect.ValueOf(l1vv.Interface()), l2vv)
+ i.handleValuePair(reflect.ValueOf(l1vv.Interface()), l2vv)
}
}
diff --git a/tpl/fmt/fmt.go b/tpl/fmt/fmt.go
index e9d47dbd4..96695442e 100644
--- a/tpl/fmt/fmt.go
+++ b/tpl/fmt/fmt.go
@@ -37,7 +37,7 @@ func (ns *Namespace) Printf(format string, a ...interface{}) string {
}
-// Print returns string representation of the passed arguments ending with a newline.
+// Println returns string representation of the passed arguments ending with a newline.
func (ns *Namespace) Println(a ...interface{}) string {
return _fmt.Sprintln(a...)
}
diff --git a/tpl/images/images.go b/tpl/images/images.go
index ce29ac4d5..66999aa37 100644
--- a/tpl/images/images.go
+++ b/tpl/images/images.go
@@ -23,6 +23,7 @@ import (
_ "image/jpeg"
_ "image/png"
+ // Import webp codec
_ "golang.org/x/image/webp"
"github.com/gohugoio/hugo/deps"