Skip to content

Instantly share code, notes, and snippets.

@Grayda
Created May 13, 2015 04:09
Show Gist options
  • Select an option

  • Save Grayda/8a8d8bcb41f00e5e0dcc to your computer and use it in GitHub Desktop.

Select an option

Save Grayda/8a8d8bcb41f00e5e0dcc to your computer and use it in GitHub Desktop.
main.go for Ninja Sphere driver
package main
import (
"fmt"
"os"
"os/signal"
)
func main() {
NewDriver()
// We don't want our driver to end, so we hold tight until we get an interrupt signal
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill)
// Block until a signal is received.
s := <-c
fmt.Println("Got signal:", s)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment