style: remove redundant judgment

Signed-off-by: cndoit18 <cndoit18@outlook.com>
This commit is contained in:
cndoit18
2022-07-29 18:25:05 +08:00
parent 26842bb0c8
commit ec43037d0f
26 changed files with 26 additions and 112 deletions

View File

@@ -63,10 +63,7 @@ func normalizeWebhookConfig(config *imagePolicyWebhookConfig) (err error) {
return err
}
config.DenyTTL, err = normalizeConfigDuration("deny cache", time.Second, config.DenyTTL, minDenyTTL, maxDenyTTL, defaultDenyTTL)
if err != nil {
return err
}
return nil
return err
}
func normalizeConfigDuration(name string, scale, value, min, max, defaultValue time.Duration) (time.Duration, error) {