Commit a4114056 authored by Henry Huang's avatar Henry Huang

Clean up code via "go fmt"

parent c33e7cc8
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
) )
type stepStopInstance struct{ type stepStopInstance struct {
SpotPrice string SpotPrice string
} }
func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction { func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction {
...@@ -17,11 +17,11 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction { ...@@ -17,11 +17,11 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction {
instance := state.Get("instance").(*ec2.Instance) instance := state.Get("instance").(*ec2.Instance)
ui := state.Get("ui").(packer.Ui) ui := state.Get("ui").(packer.Ui)
// Skip when it is a spot instance // Skip when it is a spot instance
if s.SpotPrice != "" { if s.SpotPrice != "" {
ui.Say(fmt.Sprintf("This is a spot instance, no need to stop for the AMI")) ui.Say(fmt.Sprintf("This is a spot instance, no need to stop for the AMI"))
return multistep.ActionContinue return multistep.ActionContinue
} }
// Stop the instance so we can create an AMI from it // Stop the instance so we can create an AMI from it
ui.Say("Stopping the source instance...") ui.Say("Stopping the source instance...")
......
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