Closed Morgahl closed 7 years ago
Oooo... I would accept this. However, there's a very good chance that the name you gave for the cancel function could conflict with the name a user gives. c
by itself is likely too common of a name. Therefore I'd recommend prefixing it with an underscore or something.
It doesn't follow normal naming conventions, but that's why I've ended up doing this so far, to avoid naming conflicts.
Good call. I've updated the template variables to be more expressive and follow your existing underscore-prefixed template variable convention.
@Ayiga This set of changes is a small fix to add handling of
context.CancelFunc
returned fromcontext.WithTimeout
. This set of changes is due to newgo vet
directives added in go1.8 to handlecontext.CancelFunc
instead of ignoring them. An example below:Please review and let me know what you think on this.