Created
May 13, 2015 04:09
-
-
Save Grayda/8a8d8bcb41f00e5e0dcc to your computer and use it in GitHub Desktop.
main.go for Ninja Sphere driver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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