mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 14:40:43 +03:00
all: Apply staticcheck recommendations
This commit is contained in:
parent
3011f36c27
commit
b5f39d23b8
41 changed files with 98 additions and 252 deletions
|
@ -442,13 +442,6 @@ func lexMainSection(l *pageLexer) stateFunc {
|
|||
|
||||
}
|
||||
|
||||
func (l *pageLexer) posFirstNonWhiteSpace() int {
|
||||
f := func(c rune) bool {
|
||||
return !unicode.IsSpace(c)
|
||||
}
|
||||
return bytes.IndexFunc(l.input[l.pos:], f)
|
||||
}
|
||||
|
||||
func lexDone(l *pageLexer) stateFunc {
|
||||
|
||||
// Done!
|
||||
|
@ -477,14 +470,6 @@ func (l *pageLexer) hasPrefix(prefix []byte) bool {
|
|||
return bytes.HasPrefix(l.input[l.pos:], prefix)
|
||||
}
|
||||
|
||||
func (l *pageLexer) hasPrefixByte(prefix byte) bool {
|
||||
b := l.input[l.pos:]
|
||||
if len(b) == 0 {
|
||||
return false
|
||||
}
|
||||
return b[0] == prefix
|
||||
}
|
||||
|
||||
// helper functions
|
||||
|
||||
// returns the min index >= 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue