change run signatures

Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.

`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
This commit is contained in:
Matthew Hooker
2018-01-24 17:09:17 -08:00
parent a0c625ea44
commit a831d522be
240 changed files with 241 additions and 241 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ type stepCreateInstance struct {
}
// Run executes the Packer build step that creates a CloudStack instance.
func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction {
func (s *stepCreateInstance) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
client := state.Get("client").(*cloudstack.CloudStackClient)
config := state.Get("config").(*Config)
ui := state.Get("ui").(packer.Ui)