chore: upgrade golangci-lint

This commit is contained in:
Oleg Lobanov
2021-07-26 12:00:05 +02:00
parent 201329abce
commit 34d7d2c8c4
17 changed files with 37 additions and 45 deletions

View File

@@ -174,6 +174,8 @@ func (s *Service) Resize(ctx context.Context, in io.Reader, width, height int, o
switch config.resizeMode {
case ResizeModeFill:
img = imaging.Fill(img, width, height, imaging.Center, config.quality.resampleFilter())
case ResizeModeFit:
fallthrough //nolint:gocritic
default:
img = imaging.Fit(img, width, height, config.quality.resampleFilter())
}
@@ -205,7 +207,7 @@ func getEmbeddedThumbnail(in io.Reader) ([]byte, io.Reader, error) {
offset := 0
offsets := []int{12, 30}
head := make([]byte, 0xffff)
head := make([]byte, 0xffff) //nolint:gomnd
_, err := r.Read(head)
if err != nil {