Skip to content

Commit

Permalink
Merge pull request #2 from atreya2011/fix-module-name
Browse files Browse the repository at this point in the history
Fix module name and imports
  • Loading branch information
lyonlai authored Apr 11, 2021
2 parents 0fab17c + 22a4304 commit aa6ef91
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
log "github.com/sirupsen/logrus" // nolint: depguard

"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/registry"
"github.com/pkg/errors"
"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
"github.com/squareup/protoc-gen-grpc-gateway-ts/registry"
)

// TypeScriptGRPCGatewayGenerator is the protobuf generator for typescript
Expand Down
7 changes: 4 additions & 3 deletions generator/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ package generator
import (
"bytes"
"fmt"
log "github.com/sirupsen/logrus"
"regexp"
"strings"
"text/template"

log "github.com/sirupsen/logrus"

"github.com/Masterminds/sprig"
"github.com/iancoleman/strcase"

"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
"github.com/squareup/protoc-gen-grpc-gateway-ts/registry"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/registry"
)

const tmpl = `
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/squareup/protoc-gen-grpc-gateway-ts
module github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts

go 1.14

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
log "github.com/sirupsen/logrus" // nolint: depguard
"google.golang.org/protobuf/proto"

"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/generator"
"github.com/pkg/errors"
"github.com/squareup/protoc-gen-grpc-gateway-ts/generator"
)

func decodeReq() *plugin.CodeGeneratorRequest {
Expand Down
2 changes: 1 addition & 1 deletion registry/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package registry
import (
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"

"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
)

func (r *Registry) analyseEnumType(fileData *data.File, packageName, fileName string, parents []string, enum *descriptorpb.EnumDescriptorProto) {
Expand Down
2 changes: 1 addition & 1 deletion registry/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package registry
import (
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"

"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
)

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

import (
"path/filepath"
"strings"

descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus" // nolint: depguard
"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
"path/filepath"
"strings"
)

func (r *Registry) analyseFile(f *descriptorpb.FileDescriptorProto) (*data.File, error) {
Expand Down
2 changes: 1 addition & 1 deletion registry/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package registry
import (
descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"

"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
)

func (r *Registry) analyseMessage(fileData *data.File, packageName, fileName string, parents []string, message *descriptorpb.DescriptorProto) {
Expand Down
2 changes: 1 addition & 1 deletion registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus" // nolint: depguard
"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
)

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

import (
"fmt"

descriptorpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
"google.golang.org/genproto/googleapis/api/annotations"
"google.golang.org/protobuf/proto"

"github.com/squareup/protoc-gen-grpc-gateway-ts/data"
"github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/data"
)

func getHTTPAnnotation(m *descriptorpb.MethodDescriptorProto) *annotations.HttpRule {
Expand Down

0 comments on commit aa6ef91

Please sign in to comment.