Remove explicit err var declaration
This commit is contained in:
parent
c505f1c45e
commit
50262ba0b8
|
@ -84,8 +84,6 @@ func (s *StepCreateExternalSwitch) Cleanup(state multistep.StateBag) {
|
|||
|
||||
ui.Say("Unregistering and deleting external switch...")
|
||||
|
||||
var err error = nil
|
||||
|
||||
errMsg := "Error deleting external switch: %s"
|
||||
|
||||
// connect the vm to the old switch
|
||||
|
@ -94,7 +92,7 @@ func (s *StepCreateExternalSwitch) Cleanup(state multistep.StateBag) {
|
|||
return
|
||||
}
|
||||
|
||||
err = driver.ConnectVirtualMachineNetworkAdapterToSwitch(vmName, s.oldSwitchName)
|
||||
err := driver.ConnectVirtualMachineNetworkAdapterToSwitch(vmName, s.oldSwitchName)
|
||||
if err != nil {
|
||||
ui.Error(fmt.Sprintf(errMsg, err))
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue