convox / convox

Found trapping a signal that cannot be trapped SCC-SA1016
Anti-pattern
Major
8 days agoa year old
os.Kill cannot be trapped (did you mean syscall.SIGTERM?)
50
51func handleInterrupt(fn func()) {
52	ch := make(chan os.Signal, 1)
53	signal.Notify(ch, os.Interrupt, os.Kill)54	<-ch
55	fmt.Println("")
56	fn()