Don't assert nil values in convertStringArr
Some of the inputs to this function may not have been validated
This commit is contained in:
parent
1a08318a45
commit
4be35a5e4e
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue