fix: error from golangci-lint tool (#623)

This commit is contained in:
Bo-Yi Wu
2021-08-03 14:44:00 +08:00
committed by GitHub
parent 349c0c8c1d
commit 0a8d801380
15 changed files with 74 additions and 164 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/appleboy/gorush/rpc"
"google.golang.org/grpc"
"google.golang.org/grpc/status"
)
const (
@@ -27,7 +28,7 @@ func main() {
for {
ok, err := client.Check(context.Background())
if !ok || err != nil {
log.Printf("can't connect grpc server: %v, code: %v\n", err, grpc.Code(err))
log.Printf("can't connect grpc server: %v, code: %v\n", err, status.Code(err))
} else {
log.Println("connect the grpc server successfully")
}