Skip to content

Instantly share code, notes, and snippets.

@zerbitx
Created January 3, 2018 17:27
Show Gist options
  • Save zerbitx/618163aefd482b2a76caf5e39af3f040 to your computer and use it in GitHub Desktop.
Save zerbitx/618163aefd482b2a76caf5e39af3f040 to your computer and use it in GitHub Desktop.
Too much effort for a joke.
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"github.com/erikdubbelboer/gspt"
)
func main() {
c := make(chan os.Signal)
gspt.SetProcTitle("A function has no name")
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
for {
select {
case sig := <-c:
if sig == syscall.SIGQUIT {
return
}
fmt.Println("!today")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment