Skip to content

Commit

Permalink
Replaces %s with %w in fmt.Errorf()
Browse files Browse the repository at this point in the history
Co-authored-by: angie pinilla <angelinepinilla@gmail.com>
  • Loading branch information
gdavison and anGie44 committed Nov 9, 2021
1 parent 7360c59 commit 6839186
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_documentation_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func resourceAwsApiGatewayDocumentationVersionRead(d *schema.ResourceData, meta
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Documentation Version (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Documentation Version (%s): %w", d.Id(), err)
}

d.Set("rest_api_id", apiId)
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_domain_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func resourceAwsApiGatewayDomainNameRead(d *schema.ResourceData, meta interface{
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Domain Name (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Domain Name (%s): %w", d.Id(), err)
}

tags := keyvaluetags.ApigatewayKeyValueTags(domainName.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig)
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_gateway_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func resourceAwsApiGatewayGatewayResponseRead(d *schema.ResourceData, meta inter
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Response (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Response (%s): %w", d.Id(), err)
}

log.Printf("[DEBUG] Received API Gateway Gateway Response: %s", gatewayResponse)
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func resourceAwsApiGatewayIntegrationRead(d *schema.ResourceData, meta interface
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Integration (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Integration (%s): %w", d.Id(), err)
}
log.Printf("[DEBUG] Received API Gateway Integration: %s", integration)

Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_integration_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func resourceAwsApiGatewayIntegrationResponseRead(d *schema.ResourceData, meta i
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Integration Response (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Integration Response (%s): %w", d.Id(), err)
}

log.Printf("[DEBUG] Received API Gateway Integration Response: %s", integrationResponse)
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func resourceAwsApiGatewayMethodRead(d *schema.ResourceData, meta interface{}) e
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Method (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Method (%s): %w", d.Id(), err)
}
log.Printf("[DEBUG] Received API Gateway Method: %s", out)

Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_method_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func resourceAwsApiGatewayMethodResponseRead(d *schema.ResourceData, meta interf
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Method Response (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Method Response (%s): %w", d.Id(), err)
}

log.Printf("[DEBUG] Received API Gateway Method Response: %s", methodResponse)
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func resourceAwsApiGatewayModelRead(d *schema.ResourceData, meta interface{}) er
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Model (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Model (%s): %w", d.Id(), err)
}
log.Printf("[DEBUG] Received API Gateway Model: %s", out)

Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_request_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func resourceAwsApiGatewayRequestValidatorRead(d *schema.ResourceData, meta inte
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Request Validator (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Request Validator (%s): %w", d.Id(), err)
}

d.Set("name", out.Name)
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func resourceAwsApiGatewayResourceRead(d *schema.ResourceData, meta interface{})
d.SetId("")
return nil
}
return fmt.Errorf("error reading API Gateway Resource (%s): %s", d.Id(), err)
return fmt.Errorf("error reading API Gateway Resource (%s): %w", d.Id(), err)
}

d.Set("parent_id", resource.ParentId)
Expand Down

0 comments on commit 6839186

Please sign in to comment.