Skip to content

Commit

Permalink
Merge pull request #158 from dmcgowan/update-protobuf
Browse files Browse the repository at this point in the history
Fix proto3 generation error
  • Loading branch information
dmcgowan authored Feb 21, 2024
2 parents 90d421e + 73b6a91 commit faba589
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/protoc-gen-go-ttrpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

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

func main() {
Expand All @@ -30,6 +31,7 @@ func main() {
return nil
},
}.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 faba589

Please sign in to comment.