From 348942d3fb1f21134ccbc4fe0beccfcb95ad6d37 Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Fri, 1 May 2015 09:38:11 -0400 Subject: [PATCH] providers/aws: Use GetOk instead of Get + cast --- builtin/providers/aws/resource_aws_s3_bucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_s3_bucket.go b/builtin/providers/aws/resource_aws_s3_bucket.go index c5e3b51fd..6605837f8 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket.go +++ b/builtin/providers/aws/resource_aws_s3_bucket.go @@ -220,7 +220,7 @@ func resourceAwsS3BucketWebsiteDelete(s3conn *s3.S3, d *schema.ResourceData) err func websiteEndpoint(s3conn *s3.S3, d *schema.ResourceData) (string, error) { // If the bucket doesn't have a website configuration, return an empty // endpoint - if len(d.Get("website").([]interface{})) == 0 { + if _, ok := d.GetOk("website"); !ok { return "", nil }