mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-18 08:11:15 +00:00
fix tabs/spaces
This commit is contained in:
parent
a939599a1c
commit
3c32b810d5
@ -86,11 +86,11 @@ func PurgeOldTags(client *Client, purgeDryRun bool, purgeTagsKeepDays, purgeTags
|
||||
|
||||
// Filter out tags by retention days and regexp
|
||||
for _, tag := range repos[repo] {
|
||||
regexpKeep := false
|
||||
if purgeTagsKeepRegexp != "" {
|
||||
regexpMatch, _ := regexp.MatchString(purgeTagsKeepRegexp, tag.name)
|
||||
regexpKeep = regexpMatch
|
||||
}
|
||||
regexpKeep := false
|
||||
if purgeTagsKeepRegexp != "" {
|
||||
regexpMatch, _ := regexp.MatchString(purgeTagsKeepRegexp, tag.name)
|
||||
regexpKeep = regexpMatch
|
||||
}
|
||||
delta := int(now.Sub(tag.created).Hours() / 24)
|
||||
if !regexpKeep && delta > purgeTagsKeepDays {
|
||||
purgeTags[repo] = append(purgeTags[repo], tag.name)
|
||||
|
Loading…
Reference in New Issue
Block a user