Merge branch 'master' of github.com:hashicorp/terraform

* 'master' of github.com:hashicorp/terraform:
  Don't assert nil values in convertStringArr
This commit is contained in:
clint shryock 2016-10-19 09:47:30 -05:00
commit 22b3e8998d
1 changed files with 6 additions and 3 deletions

View File

@ -89,9 +89,12 @@ func resourceComputeTargetPool() *schema.Resource {
}
func convertStringArr(ifaceArr []interface{}) []string {
arr := make([]string, len(ifaceArr))
for i, v := range ifaceArr {
arr[i], _ = v.(string)
var arr []string
for _, v := range ifaceArr {
if v == nil {
continue
}
arr = append(arr, v.(string))
}
return arr
}