Merge pull request #158 from dmcgowan/update-protobuf
Fix proto3 generation error
This commit is contained in:
commit
faba5896a9
@ -18,6 +18,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"google.golang.org/protobuf/compiler/protogen"
|
"google.golang.org/protobuf/compiler/protogen"
|
||||||
|
"google.golang.org/protobuf/types/pluginpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -30,6 +31,7 @@ func main() {
|
|||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}.Run(func(gen *protogen.Plugin) error {
|
}.Run(func(gen *protogen.Plugin) error {
|
||||||
|
gen.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
|
||||||
for _, f := range gen.Files {
|
for _, f := range gen.Files {
|
||||||
if !f.Generate {
|
if !f.Generate {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user