fix compile error

This commit is contained in:
faiface 2016-12-04 23:45:26 +01:00
parent e2b361a8cd
commit 6564597c43
1 changed files with 9 additions and 0 deletions

View File

@ -62,3 +62,12 @@ type ContextHolder struct {
func (ch *ContextHolder) Do(sub func(ctx Context)) { func (ch *ContextHolder) Do(sub func(ctx Context)) {
sub(ch.Context) sub(ch.Context)
} }
type noOpDoer struct{}
func (noOpDoer) Do(sub func(ctx Context)) {
sub(Context{})
}
// NoOpDoer is a Doer that just passes an empty context to the caller of Do.
var NoOpDoer = noOpDoer{}