fix template lint (#57)

* fix template lint
* add godoc reference
pull/67/head
Tony 6 years ago committed by Felix Hao
parent c873ef1ce9
commit cba8028987
  1. 1
      README.md
  2. 10
      tool/kratos/template.go

@ -1,6 +1,7 @@
![kratos](doc/img/kratos3.png) ![kratos](doc/img/kratos3.png)
[![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/) [![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/)
[![GoDoc](https://godoc.org/github.com/bilibili/kratos?status.svg)](https://godoc.org/github.com/bilibili/kratos)
Kratos是[bilibili](https://www.bilibili.com)开源的一套Go微服务框架,包含大量微服务相关框架及工具: Kratos是[bilibili](https://www.bilibili.com)开源的一套Go微服务框架,包含大量微服务相关框架及工具:

@ -98,11 +98,15 @@ func main() {
switch s { switch s {
case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT: case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT:
ctx, cancel := context.WithTimeout(context.Background(), 35*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 35*time.Second)
defer cancel() if err := grpcSrv.Shutdown(ctx); err != nil
grpcSrv.Shutdown(ctx) log.Error("grpcSrv.Shutdown error(%v)", err)
httpSrv.Shutdown(ctx) } // grpc
if err := httpSrv.Shutdown(ctx); err != nil {
log.Error("httpSrv.Shutdown error(%v)", err)
}
log.Info("{{.Name}} exit") log.Info("{{.Name}} exit")
svc.Close() svc.Close()
cancel()
time.Sleep(time.Second) time.Sleep(time.Second)
return return
case syscall.SIGHUP: case syscall.SIGHUP:

Loading…
Cancel
Save