From 256418917c6642f7e5b3d3206ff4b6fa03b1cb28 Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Mon, 10 Dec 2018 17:31:44 +0300 Subject: [PATCH] resource/image: Fix "always false" condition Found using gocritic linter. --- resource/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/image.go b/resource/image.go index 0fdabf788..6dea4cbb8 100644 --- a/resource/image.go +++ b/resource/image.go @@ -376,7 +376,7 @@ func parseImageConfig(config string) (imageConfig, error) { if err != nil { return c, err } - if c.Quality < 1 && c.Quality > 100 { + if c.Quality < 1 || c.Quality > 100 { return c, errors.New("quality ranges from 1 to 100 inclusive") } } else if part[0] == 'r' {