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
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/go/internal/cmd/protoc-gen-gitaly/main.go2
-rw-r--r--proto/go/internal/linter/lint.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/proto/go/internal/cmd/protoc-gen-gitaly/main.go b/proto/go/internal/cmd/protoc-gen-gitaly/main.go
index a52d0befa..16632acec 100644
--- a/proto/go/internal/cmd/protoc-gen-gitaly/main.go
+++ b/proto/go/internal/cmd/protoc-gen-gitaly/main.go
@@ -62,9 +62,9 @@ import (
"strings"
"text/template"
- "github.com/golang/protobuf/proto"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"gitlab.com/gitlab-org/gitaly/v14/proto/go/internal/linter"
+ "google.golang.org/protobuf/proto"
)
const (
diff --git a/proto/go/internal/linter/lint.go b/proto/go/internal/linter/lint.go
index 8af1fd6d6..f7d0fd43c 100644
--- a/proto/go/internal/linter/lint.go
+++ b/proto/go/internal/linter/lint.go
@@ -4,11 +4,11 @@ import (
"errors"
"fmt"
- "github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"gitlab.com/gitlab-org/gitaly/v14/internal/protoutil"
"gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb"
+ "google.golang.org/protobuf/reflect/protoregistry"
)
// ensureMethodOpType will ensure that method includes the op_type option.
@@ -20,7 +20,7 @@ import (
func ensureMethodOpType(fileDesc *descriptor.FileDescriptorProto, m *descriptor.MethodDescriptorProto, req *plugin.CodeGeneratorRequest) error {
opMsg, err := protoutil.GetOpExtension(m)
if err != nil {
- if errors.Is(err, proto.ErrMissingExtension) {
+ if errors.Is(err, protoregistry.NotFound) {
return fmt.Errorf("missing op_type extension")
}
@@ -56,7 +56,7 @@ func validateMethod(file *descriptor.FileDescriptorProto, service *descriptor.Se
return fmt.Errorf("is intercepted service: %w", err)
} else if intercepted {
if _, err := protoutil.GetOpExtension(method); err != nil {
- if errors.Is(err, proto.ErrMissingExtension) {
+ if errors.Is(err, protoregistry.NotFound) {
return nil
}