Skip to content

Commit

Permalink
providers/aws: Use GetOk instead of Get + cast
Browse files Browse the repository at this point in the history
  • Loading branch information
justincampbell committed May 2, 2015
1 parent a5a5283 commit b3e16cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_s3_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b3e16cb

Please sign in to comment.