aboutsummaryrefslogtreecommitdiff
path: root/libvirt
diff options
context:
space:
mode:
authorDuncan Mac-Vicar P <dmacvicar@suse.de>2017-11-24 17:08:15 +0100
committerDuncan Mac-Vicar P <dmacvicar@suse.de>2017-11-24 17:56:45 +0100
commit1f6b7508dac80715b794bdd1ab17e8f6141c404d (patch)
tree202a71ff61856d021904b1615f85a932efcdb8d6 /libvirt
parent81de2c8cea6a09b2112acfeade2120c2337bf366 (diff)
downloadterraform-provider-libvirt-1f6b7508dac80715b794bdd1ab17e8f6141c404d.tar
terraform-provider-libvirt-1f6b7508dac80715b794bdd1ab17e8f6141c404d.tar.gz
Simplify for loop
Diffstat (limited to 'libvirt')
-rw-r--r--libvirt/resource_libvirt_domain.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/libvirt/resource_libvirt_domain.go b/libvirt/resource_libvirt_domain.go
index 829a9d9f..16b618e2 100644
--- a/libvirt/resource_libvirt_domain.go
+++ b/libvirt/resource_libvirt_domain.go
@@ -296,9 +296,8 @@ func resourceLibvirtDomainCreate(d *schema.ResourceData, meta interface{}) error
domainDef.OS.Initrd = initrd.(string)
}
- cmdlinesCount := d.Get("cmdline.#").(int)
var cmdlineArgs []string
- for i := 0; i < cmdlinesCount; i++ {
+ for i := 0; i < d.Get("cmdline.#").(int); i++ {
cmdlineKey := fmt.Sprintf("cmdline.%d", i)
cmdlineMap := d.Get(cmdlineKey).(map[string]interface{})
for k, v := range cmdlineMap {