mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-28 12:23:19 +00:00
Avoid unnecessary conversions
No need to convert these types.
This commit is contained in:
parent
c577a9ed23
commit
6027ee1108
3 changed files with 3 additions and 3 deletions
|
@ -117,7 +117,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (l *pageLexer) next() rune {
|
func (l *pageLexer) next() rune {
|
||||||
if int(l.pos) >= len(l.input) {
|
if l.pos >= len(l.input) {
|
||||||
l.width = 0
|
l.width = 0
|
||||||
return eof
|
return eof
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ type permalinkExpandError struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pee *permalinkExpandError) Error() string {
|
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 (
|
var (
|
||||||
|
|
|
@ -93,7 +93,7 @@ func TestNSConfig(t *testing.T) {
|
||||||
|
|
||||||
// check for expected errors early to avoid writing files
|
// check for expected errors early to avoid writing files
|
||||||
if b, ok := test.expect.(bool); ok && !b {
|
if b, ok := test.expect.(bool); ok && !b {
|
||||||
_, err := ns.Config(interface{}(test.path))
|
_, err := ns.Config(test.path)
|
||||||
require.Error(t, err, errMsg)
|
require.Error(t, err, errMsg)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue