From 20adfd19f4d9546c51a360fc478e8ea0ba966ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Wed, 8 Jan 2025 14:35:39 +0000 Subject: [PATCH] fix: lint error detect --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 70b2a7b..d933237 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "context" + "errors" "io" "io/fs" "net/http" @@ -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 }