From 0794c42878196d88ff17c85a493b2eb6394827d5 Mon Sep 17 00:00:00 2001 From: Ioan Damian Date: Thu, 12 Sep 2024 16:26:35 +0200 Subject: [PATCH] test fix for golangci-lint error --- internal/awx/resource_job_template_launch.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/awx/resource_job_template_launch.go b/internal/awx/resource_job_template_launch.go index eeec275e..66636e93 100644 --- a/internal/awx/resource_job_template_launch.go +++ b/internal/awx/resource_job_template_launch.go @@ -128,11 +128,10 @@ func resourceJobTemplateLaunchCreate(ctx context.Context, d *schema.ResourceData if d.Get("wait_for_completion").(bool) { err = jobTemplateLaunchWait(ctx, client.JobService, res, d.Timeout(schema.TimeoutCreate)) - if len(err.Error()) > 0 { - //nolint:govet + if err != nil { return utils.Diagf( "JobTemplate execution failure", - fmt.Sprintf("JobTemplateLaunch with ID %d and template ID %d, failed to complete %s", res.ID, d.Get("job_template_id").(int), err.Error()), + "JobTemplateLaunch with ID %d and template ID %d, failed to complete %s", res.ID, d.Get("job_template_id").(int), err.Error(), ) } }