I'm using gin-gonic as HTTP handler. I want to prerender some graphical resources after my users make POST
request. For this, I put a middleware that assign a function (with a timer inside) to a map[string]func()
and call this function directly after assignation.
The problem is, when the user make two subsequent request, the function is called twice.
Is there any way to clear function ref and/or his currently running call like a clearInterval
or clearTimeout
in Javascript ?
Thanks