fix tabs/spaces

This commit is contained in:
dmaes 2022-04-08 12:23:51 +02:00
parent a939599a1c
commit 3c32b810d5
No known key found for this signature in database
GPG Key ID: EC714BCF2F94B6A6

View File

@ -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)