Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2020-12-01 11:46:52 +0300
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>2020-12-01 11:46:52 +0300
commit0ccd2d02fb61f1584dd7f48b3cca5d745fa7cf9a (patch)
tree52d1319dfb7d7d9b89391314ce9b6796964d7de6
parentae38755015839b67292e5f550a9a4fd72c3c1a56 (diff)
helper: move "Unimplemented" variable to its only consumer
The only consumer of the "Unimplemented" variable is this one response, let's just move it over there.
-rw-r--r--internal/gitaly/service/repository/repository.go2
-rw-r--r--internal/helper/error.go3
2 files changed, 1 insertions, 4 deletions
diff --git a/internal/gitaly/service/repository/repository.go b/internal/gitaly/service/repository/repository.go
index 6ceb3a101..3cb68bdd6 100644
--- a/internal/gitaly/service/repository/repository.go
+++ b/internal/gitaly/service/repository/repository.go
@@ -11,7 +11,7 @@ import (
// Deprecated
func (s *server) Exists(ctx context.Context, in *gitalypb.RepositoryExistsRequest) (*gitalypb.RepositoryExistsResponse, error) {
- return nil, helper.Unimplemented
+ return nil, status.Error(codes.Unimplemented, "this rpc is not implemented")
}
func (s *server) RepositoryExists(ctx context.Context, in *gitalypb.RepositoryExistsRequest) (*gitalypb.RepositoryExistsResponse, error) {
diff --git a/internal/helper/error.go b/internal/helper/error.go
index 664989a58..904a34228 100644
--- a/internal/helper/error.go
+++ b/internal/helper/error.go
@@ -7,9 +7,6 @@ import (
"google.golang.org/grpc/status"
)
-// Unimplemented is a Go error with gRPC error code 'Unimplemented'
-var Unimplemented = status.Error(codes.Unimplemented, "this rpc is not implemented")
-
type statusWrapper struct {
error
status *status.Status