diff --git a/resources/route53-health-checks.go b/resources/route53-health-checks.go index ea170a61f..851d241ba 100644 --- a/resources/route53-health-checks.go +++ b/resources/route53-health-checks.go @@ -2,10 +2,11 @@ package resources import ( "fmt" + + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/route53" "github.com/rebuy-de/aws-nuke/pkg/types" - "github.com/aws/aws-sdk-go/aws" ) func init() { @@ -17,7 +18,6 @@ func ListRoute53HealthChecks(sess *session.Session) ([]Resource, error) { params := &route53.ListHealthChecksInput{} resources := make([]Resource, 0) - for { resp, err := svc.ListHealthChecks(params) if err != nil { @@ -30,7 +30,7 @@ func ListRoute53HealthChecks(sess *session.Session) ([]Resource, error) { id: check.Id, }) } - if aws.BoolValue(resp.IsTruncated) != false { + if aws.BoolValue(resp.IsTruncated) == false { break } params.Marker = resp.NextMarker