Skip to content

Commit

Permalink
all: use new protogen options API
Browse files Browse the repository at this point in the history
Change-Id: Ib7ef4f9e8a6b7ada1f0cba4ae706be9fb8f7a10c
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/221559
Reviewed-by: Damien Neil <dneil@google.com>
  • Loading branch information
dsnet committed Feb 28, 2020
1 parent d935ec2 commit a3619c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -4,5 +4,5 @@ go 1.9

require (
github.com/google/go-cmp v0.4.0
google.golang.org/protobuf v0.0.0-20200225203307-f6cf4925a90e
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60
)
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -8,5 +8,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200225203307-f6cf4925a90e h1:wrJFqPhiw6ByHbcNMcv/+6kk7HQLewtkSxANqkwtQ/0=
google.golang.org/protobuf v0.0.0-20200225203307-f6cf4925a90e/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60 h1:qkfzMNEf79BNs1//mQGZjYHIXAOv+AOdvPnMsU6R+1I=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
2 changes: 1 addition & 1 deletion internal/cmd/generate-alias/main.go
Expand Up @@ -82,7 +82,7 @@ func main() {
}

// Use the internal logic of protoc-gen-go to generate the files.
gen, err := protogen.New(&req, nil)
gen, err := protogen.Options{}.New(&req)
check(err)
for _, file := range gen.Files {
if file.Generate {
Expand Down
5 changes: 2 additions & 3 deletions protoc-gen-go/main.go
Expand Up @@ -45,11 +45,10 @@ func main() {
}
return importPath
}
opts := &protogen.Options{
protogen.Options{
ParamFunc: flags.Set,
ImportRewriteFunc: importRewriteFunc,
}
protogen.Run(opts, func(gen *protogen.Plugin) error {
}.Run(func(gen *protogen.Plugin) error {
grpc := false
for _, plugin := range strings.Split(*plugins, ",") {
switch plugin {
Expand Down

0 comments on commit a3619c1

Please sign in to comment.