aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/go/snip-signal.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/template/go/snip-signal.go b/template/go/snip-signal.go
new file mode 100644
index 0000000..726a50b
--- /dev/null
+++ b/template/go/snip-signal.go
@@ -0,0 +1,7 @@
+sc := make(chan os.Signal, 1)
+signal.Notify(sc, os.Interrupt)
+go func(){
+ for sig := range sc {
+ {{_cursor_}}
+ }
+}()