Fix lint issues

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-11 14:53:06 +02:00
parent 229c6b99c6
commit b36bbf9992
5 changed files with 12 additions and 0 deletions

View File

@@ -178,6 +178,7 @@ func downloadImage(
if err != nil {
return nil, "", fmt.Errorf("cannot fetch logo: %w", err)
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK {
@@ -188,6 +189,7 @@ func downloadImage(
if idx := strings.Index(contentType, ";"); idx != -1 {
contentType = contentType[:idx]
}
contentType = strings.TrimSpace(contentType)
if !strings.HasPrefix(contentType, "image/") {