remove ctx arg from step.run

This commit is contained in:
Matthew Hooker 2018-01-19 16:20:16 -08:00
parent 366dc3da0a
commit 07a5af66f8
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
3 changed files with 3 additions and 6 deletions

View File

@ -70,7 +70,7 @@ func (b *BasicRunner) Run(state StateBag) {
break break
} }
action := step.Run(ctx, state) action := step.Run(state)
defer step.Cleanup(state) defer step.Cleanup(state)
if _, ok := state.GetOk(StateCancelled); ok { if _, ok := state.GetOk(StateCancelled); ok {

View File

@ -1,7 +1,6 @@
package multistep package multistep
import ( import (
"context"
"fmt" "fmt"
"reflect" "reflect"
"sync" "sync"
@ -114,7 +113,7 @@ type debugStepPause struct {
PauseFn DebugPauseFn PauseFn DebugPauseFn
} }
func (s *debugStepPause) Run(_ context.Context, state StateBag) StepAction { func (s *debugStepPause) Run(state StateBag) StepAction {
s.PauseFn(DebugLocationAfterRun, s.StepName, state) s.PauseFn(DebugLocationAfterRun, s.StepName, state)
return ActionContinue return ActionContinue
} }

View File

@ -2,8 +2,6 @@
// discrete steps. // discrete steps.
package multistep package multistep
import "context"
// A StepAction determines the next step to take regarding multi-step actions. // A StepAction determines the next step to take regarding multi-step actions.
type StepAction uint type StepAction uint
@ -28,7 +26,7 @@ type Step interface {
// //
// The return value determines whether multi-step sequences continue // The return value determines whether multi-step sequences continue
// or should halt. // or should halt.
Run(context.Context, StateBag) StepAction Run(StateBag) StepAction
// Cleanup is called in reverse order of the steps that have run // Cleanup is called in reverse order of the steps that have run
// and allow steps to clean up after themselves. Do not assume if this // and allow steps to clean up after themselves. Do not assume if this