Skip to content

Commit

Permalink
Merge pull request #332 from mterwill/optional-fields
Browse files Browse the repository at this point in the history
Support proto3 field presence
  • Loading branch information
zulakm authored Aug 30, 2021
2 parents 34d0a27 + a973182 commit 93129a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions protoc-gen-twirp/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (t *twirp) Generate(in *plugin.CodeGeneratorRequest) *plugin.CodeGeneratorR

// Showtime! Generate the response.
resp := new(plugin.CodeGeneratorResponse)
resp.SupportedFeatures = proto.Uint64(uint64(plugin.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL))
for _, f := range t.genFiles {
respFile := t.generate(f)
if respFile != nil {
Expand Down

0 comments on commit 93129a0

Please sign in to comment.