Updated the code so it makes use of the available functionality

The `helper/schema` package already knows how to create a set from a
slice with set items. So let’s use that functionality…
This commit is contained in:
Sander van Harmelen 2014-12-16 11:14:33 +01:00
parent 43a30e7d13
commit a7667986f9
1 changed files with 1 additions and 12 deletions

View File

@ -155,18 +155,7 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro
found = true
// Create an empty schema.Set to hold all found records
records := &schema.Set{
F: func(v interface{}) int {
return hashcode.String(v.(string))
},
}
for _, rec := range record.Records {
records.Add(rec)
}
d.Set("records", records)
d.Set("records", record.Records)
d.Set("ttl", record.TTL)
break