Hey all,
Since my bot is running a headless pi I wanted a way to nicely shut it down.
I think i've found gobot code to shutdown a pi, but its unclear how to call it from within a bot.
what I want to do is something like
joystickDriver.On("stop", func( data interface{} ) {
bot.shutdown()
<code here to trigger shutdown of the pi itself>
})
is it possible to cause a shutdown of the bot (and all of its goroutines) from within one of its goroutines?
thanks in advance,
CR