From aa1e390a22de40a111bb799a0c2fa628f5843588 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Wed, 19 Jul 2023 14:48:49 +0600 Subject: [PATCH] fix lint errors --- internal/adapters/terraform/aws/s3/bucket.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/adapters/terraform/aws/s3/bucket.go b/internal/adapters/terraform/aws/s3/bucket.go index 890a9ac7b..4464049a1 100644 --- a/internal/adapters/terraform/aws/s3/bucket.go +++ b/internal/adapters/terraform/aws/s3/bucket.go @@ -94,9 +94,7 @@ func getVersioning(block *terraform.Block, a *adapter) s3.Versioning { versioning.Enabled = *enabled } - if val, ok := applyForBucketRelatedResource(a, block, "aws_s3_bucket_versioning", func(resource *terraform.Block) s3.Versioning { - return getVersioningFromResource(resource) - }); ok { + if val, ok := applyForBucketRelatedResource(a, block, "aws_s3_bucket_versioning", getVersioningFromResource); ok { return val } return versioning @@ -272,5 +270,6 @@ func applyForBucketRelatedResource[T any](a *adapter, block *terraform.Block, re } } - return *new(T), false + var res T + return res, false }