Replace calls to deprecated grpc functions

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin
2017-11-28 15:12:05 -05:00
parent 118c0a279e
commit dab3ba2aff
4 changed files with 21 additions and 18 deletions

View File

@@ -15,6 +15,7 @@ import (
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func init() {
@@ -142,7 +143,7 @@ func (s *service) Update(ctx context.Context, req *api.UpdateNamespaceRequest) (
return err
}
default:
return grpc.Errorf(codes.InvalidArgument, "cannot update %q field", path)
return status.Errorf(codes.InvalidArgument, "cannot update %q field", path)
}
}
} else {