mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 17:36:59 +08:00
enable errorlint linter
This commit is contained in:
committed by
Mike Farah
parent
3f4bbf748d
commit
8711042c98
@@ -2,6 +2,7 @@ package yqlib
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
@@ -63,7 +64,7 @@ func (f *frontMatterHandlerImpl) Split() error {
|
||||
|
||||
for {
|
||||
peekBytes, err := reader.Peek(3)
|
||||
if err == io.EOF {
|
||||
if errors.Is(err, io.EOF) {
|
||||
// we've finished reading the yaml content..I guess
|
||||
break
|
||||
} else if err != nil {
|
||||
@@ -75,7 +76,7 @@ func (f *frontMatterHandlerImpl) Split() error {
|
||||
}
|
||||
line, errReading := reader.ReadString('\n')
|
||||
lineCount = lineCount + 1
|
||||
if errReading != nil && errReading != io.EOF {
|
||||
if errReading != nil && !errors.Is(errReading, io.EOF) {
|
||||
return errReading
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user