mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-19 08:36:33 +00:00
simplify statements
This commit is contained in:
parent
3c32b810d5
commit
88f927875d
@ -88,8 +88,7 @@ func PurgeOldTags(client *Client, purgeDryRun bool, purgeTagsKeepDays, purgeTags
|
||||
for _, tag := range repos[repo] {
|
||||
regexpKeep := false
|
||||
if purgeTagsKeepRegexp != "" {
|
||||
regexpMatch, _ := regexp.MatchString(purgeTagsKeepRegexp, tag.name)
|
||||
regexpKeep = regexpMatch
|
||||
regexpKeep, _ = regexp.MatchString(purgeTagsKeepRegexp, tag.name)
|
||||
}
|
||||
delta := int(now.Sub(tag.created).Hours() / 24)
|
||||
if !regexpKeep && delta > purgeTagsKeepDays {
|
||||
|
Loading…
Reference in New Issue
Block a user