Skip to content

Commit

Permalink
remove generic function from context fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed May 14, 2023
1 parent 794afaf commit 8ede8c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sf/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
)

func Context(e fixenv.Env) context.Context {
return fixenv.CacheWithCleanup(e, nil, nil, func() (context.Context, fixenv.FixtureCleanupFunc, error) {
return e.CacheWithCleanup(nil, nil, func() (res interface{}, _ fixenv.FixtureCleanupFunc, _ error) {
ctx, ctxCancel := context.WithCancel(context.Background())
return ctx, fixenv.FixtureCleanupFunc(ctxCancel), nil
})
}).(context.Context)
}

0 comments on commit 8ede8c1

Please sign in to comment.