chore: switch to moul.io/protoc-gen-gotemplate
This commit is contained in:
@@ -3,7 +3,7 @@ build:
|
||||
mkdir -p output
|
||||
|
||||
# generate pb.go inluding imported proto
|
||||
protoc --go_out=Mproto/common.proto=github.com/moul/protoc-gen-gotemplate/examples/import/output/models/common:./output proto/article.proto
|
||||
protoc --go_out=Mproto/common.proto=moul.io/protoc-gen-gotemplate/examples/import/output/models/common:./output proto/article.proto
|
||||
protoc --go_out=,plugins=grpc:./output proto/common.proto
|
||||
|
||||
# build our go file based on our template
|
||||
|
@@ -17,7 +17,7 @@ package article
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import common "github.com/moul/protoc-gen-gotemplate/examples/import/output/models/common"
|
||||
import common "moul.io/protoc-gen-gotemplate/examples/import/output/models/common"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
|
@@ -2,8 +2,8 @@
|
||||
package company
|
||||
|
||||
import (
|
||||
"github.com/moul/protoc-gen-gotemplate/examples/import/output/models/article"
|
||||
"github.com/moul/protoc-gen-gotemplate/examples/import/output/models/common"
|
||||
"moul.io/protoc-gen-gotemplate/examples/import/output/models/article"
|
||||
"moul.io/protoc-gen-gotemplate/examples/import/output/models/common"
|
||||
)
|
||||
|
||||
type Repository interface {
|
||||
@@ -37,4 +37,4 @@ func (sdk *Sdk) GetArticle(ctx context.Context,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
package {{.File.Package}}
|
||||
|
||||
import (
|
||||
"github.com/moul/protoc-gen-gotemplate/examples/import/output/models/article"
|
||||
"github.com/moul/protoc-gen-gotemplate/examples/import/output/models/common"
|
||||
"moul.io/protoc-gen-gotemplate/examples/import/output/models/article"
|
||||
"moul.io/protoc-gen-gotemplate/examples/import/output/models/common"
|
||||
)
|
||||
|
||||
type Repository interface {
|
||||
@@ -38,4 +38,4 @@ func (sdk *Sdk) {{$m.Name}}(ctx context.Context, {{if $t.OneofDecl}} req *{{$pkg
|
||||
}
|
||||
|
||||
{{end}} {{/* streaming ifs */}}
|
||||
{{end}}{{end}} {{/* range with */}}
|
||||
{{end}}{{end}} {{/* range with */}}
|
||||
|
Reference in New Issue
Block a user