Skip to content

Commit

Permalink
chore: Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lubux committed Jan 10, 2024
1 parent 9986fa5 commit 81439f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/utf8.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func canOverlap(in []byte) []byte {

// valid is a slightly modified utf8.Valid() function copied from the standard library.
// If the byte slice is not valid utf8, it additionally returns the remaining data if the
// the remaining data is smaller than the largest potential rune.
// remaining data is smaller than the largest potential rune.
func valid(p []byte) (bool, []byte) {
p = p[:len(p):len(p)]
for len(p) >= 8 {
Expand Down
3 changes: 2 additions & 1 deletion internal/utf8_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package internal
import (
"bytes"
"encoding/hex"
"errors"
"io"
"io/ioutil"
"strings"
Expand Down Expand Up @@ -61,7 +62,7 @@ func TestUtf8CheckWriteCloser(t *testing.T) {
dataReader := strings.NewReader(valid)
for {
_, err := io.CopyN(writeCloser, dataReader, copySize)
if err == io.EOF {
if errors.Is(err, io.EOF) {
break
}
if err != nil {
Expand Down

0 comments on commit 81439f1

Please sign in to comment.