Skip to content

Commit

Permalink
Merge pull request #3 from k1LoW/support-proto3-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sorcererxw authored Mar 22, 2023
2 parents 83631c4 + adbc182 commit 3689db4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/golang/mock/mockgen/model"
"google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/types/pluginpb"
)

type methodType int
Expand Down Expand Up @@ -385,6 +386,7 @@ func baseServerStreamMethods() []*model.Method {

func main() {
protogen.Options{}.Run(func(plugin *protogen.Plugin) error {
plugin.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
for path, file := range plugin.FilesByPath {
if !file.Generate {
continue
Expand Down

0 comments on commit 3689db4

Please sign in to comment.