Skip to content

Commit

Permalink
Added support for proto3 field presence (#3752)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarrettGutierrez1 committed Jul 23, 2020
1 parent a1ace91 commit cee815d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/protoc-gen-go-grpc/main.go
Expand Up @@ -34,6 +34,7 @@ import (
"flag"

"google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/types/pluginpb"
)

var requireUnimplemented *bool
Expand All @@ -45,6 +46,7 @@ func main() {
protogen.Options{
ParamFunc: flags.Set,
}.Run(func(gen *protogen.Plugin) error {
gen.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
for _, f := range gen.Files {
if !f.Generate {
continue
Expand Down

0 comments on commit cee815d

Please sign in to comment.