main.go 270 B

123456789101112131415161718192021222324
  1. package main
  2. import (
  3. "os"
  4. "os/signal"
  5. _ "net/http/pprof"
  6. )
  7. const version = "2.0.2"
  8. type ctxKey string
  9. func main() {
  10. s := startServer()
  11. stop := make(chan os.Signal, 1)
  12. signal.Notify(stop, os.Interrupt, os.Kill)
  13. <-stop
  14. shutdownServer(s)
  15. shutdownVips()
  16. }