Created
April 1, 2016 10:10
-
-
Save gonzaloserrano/1cb118a4c8f271986d8808e14bca8248 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RunnerFunc allows using ordinary functions as Runner implementations | |
type RunnerFunc func(context.Context) | |
// Run bust be implemented by RunnerFunc to implements Runner | |
// @todo exaplin why this is a common go idiom | |
func (h RunnerFunc) Run(ctx context.Context) { | |
h(ctx) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment