repository: Simplify index age calculation

This commit is contained in:
Michael Eischer 2020-03-06 23:37:51 +01:00
parent d19f05c960
commit d9a80e07b9
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ var IndexFull = func(idx *Index) bool {
for typ := range idx.byType {
blobs += idx.byType[typ].len()
}
age := time.Now().Sub(idx.created)
age := time.Since(idx.created)
switch {
case age >= indexMaxAge: