hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 6027ee11082d0b9d72de1d4d1980a702be294ad2
parent c577a9ed2347559783c44232e1f08414008c5203
Author: Christian Muehlhaeuser <muesli@gmail.com>
Date:   Fri,  2 Aug 2019 15:32:23 +0000

Avoid unnecessary conversions

No need to convert these types.

Diffstat:
Mparser/pageparser/pagelexer.go | 2+-
Mresources/page/permalinks.go | 2+-
Mtpl/images/images_test.go | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/parser/pageparser/pagelexer.go b/parser/pageparser/pagelexer.go
@@ -117,7 +117,7 @@ var (
 )
 
 func (l *pageLexer) next() rune {
-	if int(l.pos) >= len(l.input) {
+	if l.pos >= len(l.input) {
 		l.width = 0
 		return eof
 	}
diff --git a/resources/page/permalinks.go b/resources/page/permalinks.go
@@ -188,7 +188,7 @@ type permalinkExpandError struct {
 }
 
 func (pee *permalinkExpandError) Error() string {
-	return fmt.Sprintf("error expanding %q: %s", string(pee.pattern), pee.err)
+	return fmt.Sprintf("error expanding %q: %s", pee.pattern, pee.err)
 }
 
 var (
diff --git a/tpl/images/images_test.go b/tpl/images/images_test.go
@@ -93,7 +93,7 @@ func TestNSConfig(t *testing.T) {
 
 		// check for expected errors early to avoid writing files
 		if b, ok := test.expect.(bool); ok && !b {
-			_, err := ns.Config(interface{}(test.path))
+			_, err := ns.Config(test.path)
 			require.Error(t, err, errMsg)
 			continue
 		}