allow to transfer *status.Status as error from handler #107

Merged
vtolstov merged 3 commits from status into v3 2022-04-06 18:44:21 +03:00
Showing only changes of commit cbafc74e41 - Show all commits

View File

@ -255,7 +255,7 @@ func (g *grpcServer) handler(srv interface{}, stream grpc.ServerStream) (err err
if v, ok := md.Get("Grpc-Timeout"); ok { if v, ok := md.Get("Grpc-Timeout"); ok {
md.Del("Grpc-Timeout") md.Del("Grpc-Timeout")
td = v[:len(v)-1] td = v[:len(v)-1]
switch v[:] { switch v[len(v)-1:] {
case "S": case "S":
td += "s" td += "s"
case "M": case "M":