Skip to content

Commit

Permalink
protoc-gen-gosrcinfo advertises features (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump authored Feb 15, 2022
1 parent 604043b commit c1d18a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 319 deletions.
2 changes: 2 additions & 0 deletions desc/sourceinfo/cmd/protoc-gen-gosrcinfo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/jhump/gopoet"
"github.com/jhump/goprotoc/plugins"
"google.golang.org/protobuf/types/descriptorpb"
"google.golang.org/protobuf/types/pluginpb"

"github.com/jhump/protoreflect/desc"
)
Expand All @@ -22,6 +23,7 @@ func main() {
}

func genSourceInfo(req *plugins.CodeGenRequest, resp *plugins.CodeGenResponse) error {
resp.SupportsFeatures(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
args, err := parseArgs(req.Args)
if err != nil {
return err
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ go 1.13
require (
github.com/golang/protobuf v1.5.0
github.com/jhump/gopoet v0.1.0
github.com/jhump/goprotoc v0.4.0
golang.org/x/net v0.0.0-20200625001655-4c5254603344 // indirect
github.com/jhump/goprotoc v0.5.0
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.26.0
Expand Down
Loading

0 comments on commit c1d18a5

Please sign in to comment.