Commit 7dfb837d authored by Eric Richardson's avatar Eric Richardson Committed by Shawn Neal

Formatting cleanups from `go fmt`

parent fab9ca9c
......@@ -37,16 +37,16 @@ func (stepCreateDisk) Run(state multistep.StateBag) multistep.StepAction {
if len(config.AdditionalDiskSize) > 0 {
// stash the disk paths we create
additional_paths := make([]string,len(config.AdditionalDiskSize))
additional_paths := make([]string, len(config.AdditionalDiskSize))
ui.Say("Creating additional hard drives...")
for i, additionalsize := range config.AdditionalDiskSize {
additionalpath := filepath.Join(config.OutputDir, fmt.Sprintf("%s-%d.vmdk",config.DiskName,i+1))
additionalpath := filepath.Join(config.OutputDir, fmt.Sprintf("%s-%d.vmdk", config.DiskName, i+1))
size := fmt.Sprintf("%dM", uint64(additionalsize))
if err := driver.CreateDisk(additionalpath, size, config.DiskTypeId); err != nil {
err := fmt.Errorf("Error creating additional disk: %s", err)
state.Put("error",err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
......
......@@ -79,11 +79,11 @@ func (s *stepCreateVMX) Run(state multistep.StateBag) multistep.StepAction {
if len(config.AdditionalDiskSize) > 0 {
for i, _ := range config.AdditionalDiskSize {
data := &additionalDiskTemplateData{
DiskNumber: i+1,
DiskNumber: i + 1,
DiskName: config.DiskName,
}
diskTemplate, err := config.tpl.Process(DefaultAdditionalDiskTemplate,data)
diskTemplate, err := config.tpl.Process(DefaultAdditionalDiskTemplate, data)
if err != nil {
err := fmt.Errorf("Error preparing VMX template for additional disk: %s", err)
state.Put("error", err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment