mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-18 16:21:24 +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
|
// Filter out tags by retention days and regexp
|
||||||
for _, tag := range repos[repo] {
|
for _, tag := range repos[repo] {
|
||||||
regexpKeep := false
|
regexpKeep := false
|
||||||
if purgeTagsKeepRegexp != "" {
|
if purgeTagsKeepRegexp != "" {
|
||||||
regexpMatch, _ := regexp.MatchString(purgeTagsKeepRegexp, tag.name)
|
regexpMatch, _ := regexp.MatchString(purgeTagsKeepRegexp, tag.name)
|
||||||
regexpKeep = regexpMatch
|
regexpKeep = regexpMatch
|
||||||
}
|
}
|
||||||
delta := int(now.Sub(tag.created).Hours() / 24)
|
delta := int(now.Sub(tag.created).Hours() / 24)
|
||||||
if !regexpKeep && delta > purgeTagsKeepDays {
|
if !regexpKeep && delta > purgeTagsKeepDays {
|
||||||
purgeTags[repo] = append(purgeTags[repo], tag.name)
|
purgeTags[repo] = append(purgeTags[repo], tag.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user