mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-05-07 10:05:54 +00:00
pull all non-request scoped values out of context
This commit is contained in:
@@ -33,12 +33,7 @@ func (mcm *MockCounterModule) Output(context.Context, any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mcm *MockCounterModule) Start(ctx context.Context) error {
|
||||
router, ok := ctx.Value(common.RouterContextKey).(common.RouteIO)
|
||||
|
||||
if !ok {
|
||||
return fmt.Errorf("mock.counter could not get router from context")
|
||||
}
|
||||
func (mcm *MockCounterModule) Start(ctx context.Context, router common.RouteIO) error {
|
||||
mcm.router = router
|
||||
moduleContext, cancel := context.WithCancel(ctx)
|
||||
mcm.ctx = moduleContext
|
||||
|
||||
Reference in New Issue
Block a user