Skip to content

Commit faba589

Browse files
authored
Merge pull request #158 from dmcgowan/update-protobuf
Fix proto3 generation error
2 parents 90d421e + 73b6a91 commit faba589

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cmd/protoc-gen-go-ttrpc/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package main
1818

1919
import (
2020
"google.golang.org/protobuf/compiler/protogen"
21+
"google.golang.org/protobuf/types/pluginpb"
2122
)
2223

2324
func main() {
@@ -30,6 +31,7 @@ func main() {
3031
return nil
3132
},
3233
}.Run(func(gen *protogen.Plugin) error {
34+
gen.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
3335
for _, f := range gen.Files {
3436
if !f.Generate {
3537
continue

0 commit comments

Comments
 (0)