enable errorlint linter

This commit is contained in:
Matthieu MOREL
2021-11-24 09:14:02 +11:00
committed by Mike Farah
parent 3f4bbf748d
commit 8711042c98
8 changed files with 22 additions and 17 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package yqlib
import (
"container/list"
"errors"
"io"
"os"
@@ -95,7 +96,7 @@ func (s *streamEvaluator) Evaluate(filename string, reader io.Reader, node *Expr
var dataBucket yaml.Node
errorReading := decoder.Decode(&dataBucket)
if errorReading == io.EOF {
if errors.Is(errorReading, io.EOF) {
s.fileIndex = s.fileIndex + 1
return currentIndex, nil
} else if errorReading != nil {