Skip to content

Commit

Permalink
fixing error message & using else if statement instead of nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
ina-stoyanova committed Oct 12, 2020
1 parent 1c3e7fd commit d3a0674
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions aws/ecs_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ func getAllEcsClustersOlderThan(awsSession *session.Session, region string, excl
if firstSeenTime.IsZero() {
err := tagEcsClusterWhenFirstSeen(awsSession, clusterArn, time.Now().UTC())
if err != nil {
logging.Logger.Errorf("Error tagigng the ECS cluster with ARN %s", aws.StringValue(clusterArn))
logging.Logger.Errorf("Error tagging the ECS cluster with ARN %s", aws.StringValue(clusterArn))
return nil, errors.WithStackTrace(err)
}
} else {
if excludeAfter.After(firstSeenTime) {
filteredEcsClusters = append(filteredEcsClusters, clusterArn)
}
} else if excludeAfter.After(firstSeenTime) {
filteredEcsClusters = append(filteredEcsClusters, clusterArn)
}
}
return filteredEcsClusters, nil
Expand Down

0 comments on commit d3a0674

Please sign in to comment.