MCPcopy Index your code
hub / github.com/codegangsta/gin / shutdown

Function shutdown

main.go:294–306  ·  view source on GitHub ↗
(runner gin.Runner)

Source from the content-addressed store, hash-verified

292}
293
294func shutdown(runner gin.Runner) {
295 c := make(chan os.Signal, 2)
296 signal.Notify(c, os.Interrupt, syscall.SIGTERM)
297 go func() {
298 s := <-c
299 log.Println("Got signal: ", s)
300 err := runner.Kill()
301 if err != nil {
302 log.Print("Error killing: ", err)
303 }
304 os.Exit(1)
305 }()
306}

Callers 1

MainActionFunction · 0.85

Calls 1

KillMethod · 0.65

Tested by

no test coverage detected