Skip to content

Commit

Permalink
fix: lint error detect
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Jan 8, 2025
1 parent e6f8168 commit 20adfd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"errors"
"io"
"io/fs"
"net/http"
Expand Down Expand Up @@ -31,7 +32,7 @@ func GetContentType(seeker io.ReadSeeker) (string, error) {
}

bytesRead, err := seeker.Read(buff)
if err != nil && err != io.EOF {
if utilx.NotEmpty(err) && !errors.Is(err, io.EOF) {
return "", err
}

Expand Down

0 comments on commit 20adfd1

Please sign in to comment.