providers/aws: Use GetOk instead of Get + cast

This commit is contained in:
Justin Campbell 2015-05-01 09:38:11 -04:00
parent 562bd6541b
commit 348942d3fb
1 changed files with 1 additions and 1 deletions

View File

@ -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
}