fix linter

Signed-off-by: Raffaele Di Fazio <raffo@github.com>
This commit is contained in:
Raffaele Di Fazio 2021-09-16 16:45:07 +02:00
parent 68f4cad1af
commit 5cd90fea88
2 changed files with 5 additions and 5 deletions

View file

@ -521,7 +521,7 @@ func (a *API) FilterCodespacesToDelete(codespaces []*Codespace, keepThresholdDay
// get a date from a string representation
t, err := time.Parse(time.RFC3339, codespace.LastUsedAt)
if err != nil {
return nil, fmt.Errorf("error parsing last used at date: %v", err)
return nil, fmt.Errorf("error parsing last used at date: %w", err)
}
if t.Before(now().AddDate(0, 0, -keepThresholdDays)) && codespace.Environment.State == "Shutdown" {
codespacesToDelete = append(codespacesToDelete, codespace)