remove ctx arg from step.run
This commit is contained in:
parent
366dc3da0a
commit
07a5af66f8
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue