update vendor

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas
2020-03-25 16:17:31 -04:00
parent f82014e897
commit 59d813250e
17 changed files with 78 additions and 153 deletions

View File

@@ -21,7 +21,6 @@ import (
"io"
"os"
"path"
"unsafe"
"github.com/gogo/protobuf/proto"
"github.com/pkg/errors"
@@ -96,10 +95,6 @@ func (s *serviceSet) dispatch(ctx context.Context, serviceName, methodName strin
return nil, err
}
if isNil(resp) {
return nil, errors.New("ttrpc: marshal called with nil")
}
switch v := resp.(type) {
case proto.Message:
r, err := proto.Marshal(v)
@@ -159,7 +154,3 @@ func convertCode(err error) codes.Code {
func fullPath(service, method string) string {
return "/" + path.Join(service, method)
}
func isNil(resp interface{}) bool {
return (*[2]uintptr)(unsafe.Pointer(&resp))[1] == 0
}