From 6564597c43daa999eb1baf3201e80744d35caf4f Mon Sep 17 00:00:00 2001 From: faiface Date: Sun, 4 Dec 2016 23:45:26 +0100 Subject: [PATCH] fix compile error --- pixelgl/interface.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pixelgl/interface.go b/pixelgl/interface.go index 3dd71e6..16da0a6 100644 --- a/pixelgl/interface.go +++ b/pixelgl/interface.go @@ -62,3 +62,12 @@ type ContextHolder struct { func (ch *ContextHolder) Do(sub func(ctx 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{}