Skip to content

Commit 255db71

Browse files
authored
chore: fix linter errors (#2395)
1 parent c9542f9 commit 255db71

24 files changed

+47
-47
lines changed

scaleway/data_source_ipam_ip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func dataSourceScalewayIPAMIP() *schema.Resource {
6565
Optional: true,
6666
Description: "IP Type (ipv4, ipv6)",
6767
ConflictsWith: []string{"ipam_ip_id"},
68-
ValidateDiagFunc: func(i interface{}, path cty.Path) diag.Diagnostics {
68+
ValidateDiagFunc: func(i interface{}, _ cty.Path) diag.Diagnostics {
6969
switch i.(string) {
7070
case "ipv4":
7171
return nil

scaleway/data_source_object_bucket_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func TestAccScalewayDataSourceObjectBucket_ProjectIDAllowed(t *testing.T) {
9999
PreCheck: func() { testAccPreCheck(t) },
100100
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
101101
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
102-
func(s *terraform.State) error {
102+
func(_ *terraform.State) error {
103103
return terminateFakeSideProject()
104104
},
105105
testAccCheckScalewayObjectBucketDestroy(tt),
@@ -148,7 +148,7 @@ func TestAccScalewayDataSourceObjectBucket_ProjectIDForbidden(t *testing.T) {
148148
PreCheck: func() { testAccPreCheck(t) },
149149
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
150150
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
151-
func(s *terraform.State) error {
151+
func(_ *terraform.State) error {
152152
return terminateFakeSideProject()
153153
},
154154
testAccCheckScalewayObjectBucketDestroy(tt),

scaleway/data_source_secret_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func TestAccScalewayDataSourceSecret_Basic(t *testing.T) {
2222
resource.ParallelTest(t, resource.TestCase{
2323
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
2424
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
25-
func(s *terraform.State) error {
25+
func(_ *terraform.State) error {
2626
return terminateFakeSideProject()
2727
},
2828
testAccCheckScalewaySecretDestroy(tt),

scaleway/helpers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ func flattenIPNet(ipNet scw.IPNet) (string, error) {
685685
}
686686

687687
func validateDuration() schema.SchemaValidateFunc {
688-
return func(i interface{}, s string) (strings []string, errors []error) {
688+
return func(i interface{}, _ string) (strings []string, errors []error) {
689689
str, isStr := i.(string)
690690
if !isStr {
691691
return nil, []error{fmt.Errorf("%v is not a string", i)}
@@ -835,7 +835,7 @@ func getBool(d *schema.ResourceData, key string) interface{} {
835835
// validateDate will validate that field is a valid ISO 8601
836836
// It is the same as RFC3339
837837
func validateDate() schema.SchemaValidateDiagFunc {
838-
return func(i interface{}, path cty.Path) diag.Diagnostics {
838+
return func(i interface{}, _ cty.Path) diag.Diagnostics {
839839
date, isStr := i.(string)
840840
if !isStr {
841841
return diag.Errorf("%v is not a string", date)
@@ -882,7 +882,7 @@ func ErrorCheck(t *testing.T, endpointIDs ...string) resource.ErrorCheckFunc {
882882
}
883883

884884
func validateMapKeyLowerCase() schema.SchemaValidateDiagFunc {
885-
return func(i interface{}, path cty.Path) diag.Diagnostics {
885+
return func(i interface{}, _ cty.Path) diag.Diagnostics {
886886
m := expandMapStringStringPtr(i)
887887
for k := range m {
888888
if strings.ToLower(k) != k {
@@ -977,7 +977,7 @@ func getLocality(diff *schema.ResourceDiff, meta *Meta) string {
977977
// Should not be used on computed keys, if a computed key is going to change on zone/region change
978978
// this function will still block the terraform plan
979979
func customizeDiffLocalityCheck(keys ...string) schema.CustomizeDiffFunc {
980-
return func(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error {
980+
return func(_ context.Context, diff *schema.ResourceDiff, i interface{}) error {
981981
locality := getLocality(diff, i.(*Meta))
982982

983983
if locality == "" {

scaleway/helpers_baremetal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func baremetalCompareOptions(slice1, slice2 []*baremetal.ServerOption) []*bareme
350350

351351
// customDiffBaremetalPrivateNetworkOption checks that the private_network option has been set if there is a private_network
352352
func customDiffBaremetalPrivateNetworkOption() func(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error {
353-
return func(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error {
353+
return func(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error {
354354
var isPrivateNetworkOption bool
355355

356356
_, okPrivateNetwork := diff.GetOk("private_network")

scaleway/helpers_block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func waitForBlockVolume(ctx context.Context, blockAPI *block.API, zone scw.Zone,
6060

6161
// customDiffCannotShrink set key to forceNew if value shrink
6262
func customDiffCannotShrink(key string) schema.CustomizeDiffFunc {
63-
return customdiff.ForceNewIf(key, func(ctx context.Context, d *schema.ResourceDiff, meta interface{}) bool {
63+
return customdiff.ForceNewIf(key, func(_ context.Context, d *schema.ResourceDiff, _ interface{}) bool {
6464
oldValueI, newValueI := d.GetChange(key)
6565
oldValue := oldValueI.(int)
6666
newValue := newValueI.(int)

scaleway/helpers_instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ func waitForInstanceImage(ctx context.Context, api *instance.API, zone scw.Zone,
562562
return image, err
563563
}
564564

565-
func getSnapshotsFromIds(ctx context.Context, snapIDs []interface{}, instanceAPI *instance.API) ([]*instance.GetSnapshotResponse, error) {
565+
func getSnapshotsFromIDs(ctx context.Context, snapIDs []interface{}, instanceAPI *instance.API) ([]*instance.GetSnapshotResponse, error) {
566566
snapResponses := []*instance.GetSnapshotResponse(nil)
567567
for _, snapID := range snapIDs {
568568
zone, id, err := parseZonedID(snapID.(string))

scaleway/helpers_object.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ func deleteS3ObjectVersions(ctx context.Context, conn *s3.S3, bucketName string,
374374
deletionWorkers = maxObjectVersionDeletionWorkers
375375
}
376376

377-
listErr := conn.ListObjectVersionsPagesWithContext(ctx, listInput, func(page *s3.ListObjectVersionsOutput, lastPage bool) bool {
377+
listErr := conn.ListObjectVersionsPagesWithContext(ctx, listInput, func(page *s3.ListObjectVersionsOutput, _ bool) bool {
378378
pool := internal.NewWorkerPool(deletionWorkers)
379379

380380
for _, objectVersion := range page.Versions {
@@ -419,7 +419,7 @@ func deleteS3ObjectVersions(ctx context.Context, conn *s3.S3, bucketName string,
419419
return globalErr
420420
}
421421

422-
listErr = conn.ListObjectVersionsPagesWithContext(ctx, listInput, func(page *s3.ListObjectVersionsOutput, lastPage bool) bool {
422+
listErr = conn.ListObjectVersionsPagesWithContext(ctx, listInput, func(page *s3.ListObjectVersionsOutput, _ bool) bool {
423423
pool := internal.NewWorkerPool(deletionWorkers)
424424

425425
for _, deleteMarkerEntry := range page.DeleteMarkers {

scaleway/resource_iam_group.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ func resourceScalewayIamGroupCreate(ctx context.Context, d *schema.ResourceData,
9393

9494
d.SetId(group.ID)
9595

96-
appIds := expandStrings(d.Get("application_ids").(*schema.Set).List())
97-
userIds := expandStrings(d.Get("user_ids").(*schema.Set).List())
98-
if !d.Get("external_membership").(bool) && (len(appIds) > 0 || len(userIds) > 0) {
96+
appIDs := expandStrings(d.Get("application_ids").(*schema.Set).List())
97+
userIDs := expandStrings(d.Get("user_ids").(*schema.Set).List())
98+
if !d.Get("external_membership").(bool) && (len(appIDs) > 0 || len(userIDs) > 0) {
9999
_, err := api.SetGroupMembers(&iam.SetGroupMembersRequest{
100100
GroupID: group.ID,
101-
ApplicationIDs: appIds,
102-
UserIDs: userIds,
101+
ApplicationIDs: appIDs,
102+
UserIDs: userIDs,
103103
}, scw.WithContext(ctx))
104104
if err != nil {
105105
return diag.FromErr(err)
@@ -160,12 +160,12 @@ func resourceScalewayIamGroupUpdate(ctx context.Context, d *schema.ResourceData,
160160
}
161161

162162
if !d.Get("external_membership").(bool) && d.HasChanges("application_ids", "user_ids") {
163-
appIds := expandStrings(d.Get("application_ids").(*schema.Set).List())
164-
userIds := expandStrings(d.Get("user_ids").(*schema.Set).List())
165-
if len(appIds) > 0 || len(userIds) > 0 {
163+
appIDs := expandStrings(d.Get("application_ids").(*schema.Set).List())
164+
userIDs := expandStrings(d.Get("user_ids").(*schema.Set).List())
165+
if len(appIDs) > 0 || len(userIDs) > 0 {
166166
_, err = api.SetGroupMembers(&iam.SetGroupMembersRequest{
167-
ApplicationIDs: appIds,
168-
UserIDs: userIds,
167+
ApplicationIDs: appIDs,
168+
UserIDs: userIDs,
169169
GroupID: group.ID,
170170
}, scw.WithContext(ctx))
171171
if err != nil {

scaleway/resource_iam_policy_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func TestAccScalewayIamPolicy_Basic(t *testing.T) {
6060
resource.ParallelTest(t, resource.TestCase{
6161
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
6262
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
63-
func(s *terraform.State) error {
63+
func(_ *terraform.State) error {
6464
return terminateFakeSideProject()
6565
},
6666
testAccCheckScalewayIamPolicyDestroy(tt),
@@ -133,7 +133,7 @@ func TestAccScalewayIamPolicy_NoUpdate(t *testing.T) {
133133
resource.ParallelTest(t, resource.TestCase{
134134
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
135135
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
136-
func(s *terraform.State) error {
136+
func(_ *terraform.State) error {
137137
return terminateFakeSideProject()
138138
},
139139
testAccCheckScalewayIamPolicyDestroy(tt),
@@ -198,7 +198,7 @@ func TestAccScalewayIamPolicy_ChangeLinkedEntity(t *testing.T) {
198198
resource.ParallelTest(t, resource.TestCase{
199199
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
200200
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
201-
func(s *terraform.State) error {
201+
func(_ *terraform.State) error {
202202
return terminateFakeSideProject()
203203
},
204204
testAccCheckScalewayIamPolicyDestroy(tt),
@@ -300,7 +300,7 @@ func TestAccScalewayIamPolicy_ChangePermissions(t *testing.T) {
300300
resource.ParallelTest(t, resource.TestCase{
301301
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
302302
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
303-
func(s *terraform.State) error {
303+
func(_ *terraform.State) error {
304304
return terminateFakeSideProject()
305305
},
306306
testAccCheckScalewayIamPolicyDestroy(tt),
@@ -390,7 +390,7 @@ func TestAccScalewayIamPolicy_ProjectID(t *testing.T) {
390390
resource.ParallelTest(t, resource.TestCase{
391391
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
392392
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
393-
func(s *terraform.State) error {
393+
func(_ *terraform.State) error {
394394
return terminateFakeSideProject()
395395
},
396396
testAccCheckScalewayIamPolicyDestroy(tt),
@@ -455,7 +455,7 @@ func TestAccScalewayIamPolicy_ChangeRulePrincipal(t *testing.T) {
455455
resource.ParallelTest(t, resource.TestCase{
456456
ProviderFactories: fakeSideProjectProviders(ctx, tt, project, iamAPIKey),
457457
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
458-
func(s *terraform.State) error {
458+
func(_ *terraform.State) error {
459459
return terminateFakeSideProject()
460460
},
461461
testAccCheckScalewayIamPolicyDestroy(tt),

scaleway/resource_iam_ssh_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func resourceScalewayIamSSKKey() *schema.Resource {
3333
ForceNew: true,
3434
Description: "The public SSH key",
3535
// We don't consider trailing \n as diff
36-
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
36+
DiffSuppressFunc: func(_, oldValue, newValue string, _ *schema.ResourceData) bool {
3737
return strings.Trim(oldValue, "\n") == strings.Trim(newValue, "\n")
3838
},
3939
},

scaleway/resource_instance_image.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ func resourceScalewayInstanceImageCreate(ctx context.Context, d *schema.Resource
187187
Public: expandBoolPtr(d.Get("public")),
188188
}
189189

190-
extraVolumesIds, volumesExist := d.GetOk("additional_volume_ids")
190+
extraVolumesIDs, volumesExist := d.GetOk("additional_volume_ids")
191191
if volumesExist {
192-
snapResponses, err := getSnapshotsFromIds(ctx, extraVolumesIds.([]interface{}), instanceAPI)
192+
snapResponses, err := getSnapshotsFromIDs(ctx, extraVolumesIDs.([]interface{}), instanceAPI)
193193
if err != nil {
194194
return diag.FromErr(err)
195195
}
@@ -289,7 +289,7 @@ func resourceScalewayInstanceImageUpdate(ctx context.Context, d *schema.Resource
289289
}
290290

291291
if d.HasChange("additional_volume_ids") {
292-
snapResponses, err := getSnapshotsFromIds(ctx, d.Get("additional_volume_ids").([]interface{}), instanceAPI)
292+
snapResponses, err := getSnapshotsFromIDs(ctx, d.Get("additional_volume_ids").([]interface{}), instanceAPI)
293293
if err != nil {
294294
return diag.FromErr(err)
295295
}

scaleway/resource_instance_ip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func resourceScalewayInstanceIP() *schema.Resource {
6161
"organization_id": organizationIDSchema(),
6262
"project_id": projectIDSchema(),
6363
},
64-
CustomizeDiff: func(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error {
64+
CustomizeDiff: func(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error {
6565
// The only allowed change is
6666
// nat -> routed_ipv4
6767
if diff.HasChange("type") {

scaleway/resource_instance_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ func TestAccScalewayInstanceServer_IPMigrate(t *testing.T) {
18391839
resource.ParallelTest(t, resource.TestCase{
18401840
PreCheck: func() { testAccPreCheck(t) },
18411841
CheckDestroy: resource.ComposeAggregateTestCheckFunc(
1842-
func(s *terraform.State) error {
1842+
func(_ *terraform.State) error {
18431843
return terminateFakeSideProject()
18441844
},
18451845
testAccCheckScalewayInstanceServerDestroy(tt),

scaleway/resource_k8s_cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func resourceScalewayK8SCluster() *schema.Resource {
232232
},
233233
},
234234
CustomizeDiff: customdiff.All(
235-
func(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error {
235+
func(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error {
236236
autoUpgradeEnable, okAutoUpgradeEnable := diff.GetOkExists("auto_upgrade.0.enable")
237237

238238
version := diff.Get("version").(string)
@@ -244,7 +244,7 @@ func resourceScalewayK8SCluster() *schema.Resource {
244244

245245
return nil
246246
},
247-
func(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error {
247+
func(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error {
248248
if diff.HasChange("private_network_id") {
249249
actual, planned := diff.GetChange("private_network_id")
250250
clusterType := diff.Get("type").(string)

scaleway/resource_lb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func resourceScalewayLb() *schema.Resource {
9090
MaxItems: 8,
9191
Set: lbPrivateNetworkSetHash,
9292
Description: "List of private network to connect with your load balancer",
93-
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
93+
DiffSuppressFunc: func(k, oldValue, newValue string, _ *schema.ResourceData) bool {
9494
// Check if the key is for the 'private_network_id' attribute
9595
if strings.HasSuffix(k, "private_network_id") {
9696
return expandID(oldValue) == expandID(newValue)

scaleway/resource_mnq_sqs_queue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func TestAccScalewayMNQSQSQueue_DefaultProject(t *testing.T) {
125125
}(),
126126
CheckDestroy: resource.ComposeTestCheckFunc(
127127
testAccCheckScalewayMNQSQSQueueDestroy(tt),
128-
func(state *terraform.State) error {
128+
func(_ *terraform.State) error {
129129
return accountAPI.DeleteProject(&accountV3.ProjectAPIDeleteProjectRequest{
130130
ProjectID: projectID,
131131
})

scaleway/resource_object_bucket.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func resourceScalewayObjectBucket() *schema.Resource {
208208
},
209209
},
210210
},
211-
CustomizeDiff: func(ctx context.Context, diff *schema.ResourceDiff, meta interface{}) error {
211+
CustomizeDiff: func(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error {
212212
if diff.Get("object_lock_enabled").(bool) {
213213
if diff.HasChange("versioning") && !diff.Get("versioning.0.enabled").(bool) {
214214
return errors.New("versioning must be enabled when object lock is enabled")

scaleway/resource_object_bucket_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ func testAccCheckScalewayObjectBucketDestroy(tt *TestTools) resource.TestCheckFu
446446
}
447447

448448
func testSweepStorageObjectBucket(_ string) error {
449-
return sweepRegions([]scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}, func(scwClient *scw.Client, region scw.Region) error {
449+
return sweepRegions([]scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}, func(_ *scw.Client, region scw.Region) error {
450450
s3client, err := sharedS3ClientForRegion(region)
451451
if err != nil {
452452
return fmt.Errorf("error getting client: %s", err)

scaleway/resource_redis_cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func resourceScalewayRedisCluster() *schema.Resource {
120120
Description: "Private network specs details",
121121
ConflictsWith: []string{"acl"},
122122
Set: redisPrivateNetworkSetHash,
123-
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
123+
DiffSuppressFunc: func(k, oldValue, newValue string, _ *schema.ResourceData) bool {
124124
// Check if the key is for the 'id' attribute
125125
if strings.HasSuffix(k, "id") {
126126
return expandID(oldValue) == expandID(newValue)

scaleway/resource_redis_cluster_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ func TestAccScalewayRedisCluster_Endpoints_Standalone(t *testing.T) {
410410
resource.TestCheckResourceAttrSet("scaleway_redis_cluster.main", "private_network.1.id"),
411411
resource.TestCheckResourceAttrSet("scaleway_redis_cluster.main", "private_network.1.endpoint_id"),
412412
testAccCheckScalewayRedisPrivateNetworksIpsAreEither("scaleway_redis_cluster.main", "10.12.1.0/20", "192.168.1.0/20"),
413-
testAccCheckScalewayRedisPrivateNetworksIdsAreEither("scaleway_redis_cluster.main", "scaleway_vpc_private_network.pn", "scaleway_vpc_private_network.pn2"),
413+
testAccCheckScalewayRedisPrivateNetworksIDsAreEither("scaleway_redis_cluster.main", "scaleway_vpc_private_network.pn", "scaleway_vpc_private_network.pn2"),
414414
),
415415
},
416416
{
@@ -728,7 +728,7 @@ func testAccCheckScalewayRedisPrivateNetworksIpsAreEither(name string, possibili
728728
}
729729
}
730730

731-
func testAccCheckScalewayRedisPrivateNetworksIdsAreEither(name string, possibilities ...string) resource.TestCheckFunc {
731+
func testAccCheckScalewayRedisPrivateNetworksIDsAreEither(name string, possibilities ...string) resource.TestCheckFunc {
732732
return func(state *terraform.State) error {
733733
rs, ok := state.RootModule().Resources[name]
734734
if !ok {

scaleway/resource_tem_domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func resourceScalewayTemDomain() *schema.Resource {
3636
Required: true,
3737
ForceNew: true,
3838
Description: "Accept the Scaleway Terms of Service",
39-
ValidateFunc: func(i interface{}, k string) (warnings []string, errs []error) {
39+
ValidateFunc: func(i interface{}, _ string) (warnings []string, errs []error) {
4040
v := i.(bool)
4141
if !v {
4242
errs = append(errs, errors.New("you must accept the Scaleway Terms of Service to use this service"))

scaleway/resource_webhosting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func resourceScalewayWebhosting() *schema.Resource {
138138
"project_id": projectIDSchema(),
139139
"organization_id": organizationIDSchema(),
140140
},
141-
CustomizeDiff: func(context context.Context, diff *schema.ResourceDiff, m interface{}) error {
141+
CustomizeDiff: func(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error {
142142
if diff.HasChange("tags") {
143143
oldTagsInterface, newTagsInterface := diff.GetChange("tags")
144144
oldTags := expandStrings(oldTagsInterface)

scaleway/retryable_transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func newRetryableTransportWithOptions(defaultTransport http.RoundTripper, option
3434
}
3535

3636
// If ErrorHandler is not set, retryablehttp will wrap http errors
37-
c.ErrorHandler = func(resp *http.Response, err error, numTries int) (*http.Response, error) {
37+
c.ErrorHandler = func(resp *http.Response, err error, _ int) (*http.Response, error) {
3838
// err is not nil if there was an error while performing request
3939
// it should be passed, but do not create an error when request contains an error code
4040
// http errors are handled by sdk coming after this transport

0 commit comments

Comments
 (0)