Merge pull request #240 from HAOYUatHZ/template

refine main.go template
pull/248/head
Tony 5 years ago committed by GitHub
commit c81a0f7bbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tool/kratos/template.go

@ -142,8 +142,7 @@ func main() {
httpSrv := http.New(svc) httpSrv := http.New(svc)
c := make(chan os.Signal, 1) c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT) signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
for { for s := range c {
s := <-c
log.Info("get a signal %s", s.String()) log.Info("get a signal %s", s.String())
switch s { switch s {
case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT: case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT:

Loading…
Cancel
Save