fix golint issues in zrpc (#531)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// StreamCrashInterceptor catches panics in processing stream requests and recovers.
|
||||
func StreamCrashInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo,
|
||||
handler grpc.StreamHandler) (err error) {
|
||||
defer handleCrash(func(r interface{}) {
|
||||
@@ -19,6 +20,7 @@ func StreamCrashInterceptor(srv interface{}, stream grpc.ServerStream, info *grp
|
||||
return handler(srv, stream)
|
||||
}
|
||||
|
||||
// UnaryCrashInterceptor catches panics in processing unary requests and recovers.
|
||||
func UnaryCrashInterceptor() grpc.UnaryServerInterceptor {
|
||||
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo,
|
||||
handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
|
||||
Reference in New Issue
Block a user