You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to run a target/function when another target gets closed using ctrl-c. The reason for this is I'm creating a webserver using go, and have a mage target to build an executable and run it, and the only way to close it is by using ctrl-c. I would like to be able to run the target Cleanup() after hitting ctrl-c.
Is there anyway to do this? Is this what context.Context() is for?
Thanks in advance!