Skip to content

Commit

Permalink
use descriptorpb from github.com/golang/protobuf/protoc-gen-go
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas authored and lyonlai committed Oct 27, 2020
1 parent 08c6dff commit cd96c9a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion registry/enum.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package registry

import (
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"

"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
"google.golang.org/protobuf/types/descriptorpb"
)

func (r *Registry) analyseEnumType(fileData *data.File, packageName, fileName string, parents []string, enum *descriptorpb.EnumDescriptorProto) {
Expand Down
3 changes: 2 additions & 1 deletion registry/field.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package registry

import (
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"

"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
"google.golang.org/protobuf/types/descriptorpb"
)

// getFieldType generates an intermediate type and leave the rendering logic to choose what to render
Expand Down
5 changes: 3 additions & 2 deletions registry/file.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package registry

import (
"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
log "github.com/sirupsen/logrus" // nolint: depguard
"google.golang.org/protobuf/types/descriptorpb"

"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
)

func (r *Registry) analyseFile(f *descriptorpb.FileDescriptorProto) *data.File {
Expand Down
3 changes: 2 additions & 1 deletion registry/message.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package registry

import (
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"

"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
"google.golang.org/protobuf/types/descriptorpb"
)

func (r *Registry) analyseMessage(fileData *data.File, packageName, fileName string, parents []string, message *descriptorpb.DescriptorProto) {
Expand Down
12 changes: 7 additions & 5 deletions registry/registry.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package registry

import (
"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
"git.sqcorp.co/cash/gap/errors"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
log "github.com/sirupsen/logrus" // nolint: depguard
"google.golang.org/protobuf/types/descriptorpb"
"path"
"path/filepath"
"strings"

descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
log "github.com/sirupsen/logrus" // nolint: depguard

"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
"git.sqcorp.co/cash/gap/errors"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion registry/service.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package registry

import (
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"

"git.sqcorp.co/cash/gap/cmd/protoc-gen-grpc-gateway-ts/data"
"google.golang.org/protobuf/types/descriptorpb"
)

func (r *Registry) analyseService(fileData *data.File, packageName string, fileName string, service *descriptorpb.ServiceDescriptorProto) {
Expand Down

0 comments on commit cd96c9a

Please sign in to comment.