chore: update golangci-lint config

This commit is contained in:
Steven
2023-09-17 22:55:13 +08:00
parent 9eb077c4af
commit cd0ea6558d
72 changed files with 272 additions and 187 deletions

View File

@@ -1,7 +1,7 @@
package getter
import (
"fmt"
"errors"
"io"
"net/http"
"net/url"
@@ -29,7 +29,7 @@ func GetImage(urlStr string) (*Image, error) {
return nil, err
}
if !strings.HasPrefix(mediatype, "image/") {
return nil, fmt.Errorf("Wrong image mediatype")
return nil, errors.New("Wrong image mediatype")
}
bodyBytes, err := io.ReadAll(response.Body)