Skip to content

Commit

Permalink
provider/google: Idiomatic checking for presence of config val
Browse files Browse the repository at this point in the history
  • Loading branch information
evandbrown committed Aug 8, 2016
1 parent 98c21dc commit d483031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/providers/google/resource_compute_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ func resourceComputeImageCreate(d *schema.ResourceData, meta interface{}) error
Name: d.Get("name").(string),
}

if v := d.Get("description"); v != nil {
if v, ok := d.GetOk("description"); ok {
image.Description = v.(string)
}

if v := d.Get("family"); v != nil {
if v, ok := d.GetOk("family"); ok {
image.Family = v.(string)
}

Expand Down

0 comments on commit d483031

Please sign in to comment.