Skip to content

Commit 972120a

Browse files
Giovanni Berigiovanniberi93
authored andcommitted
feat: allow optional keyword
PE-1229
1 parent f2dbcf2 commit 972120a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"go.einride.tech/aip/cmd/protoc-gen-go-aip/internal/genaip"
1010
"google.golang.org/protobuf/compiler/protogen"
11+
"google.golang.org/protobuf/types/pluginpb"
1112
)
1213

1314
func main() {
@@ -27,6 +28,7 @@ func main() {
2728
protogen.Options{
2829
ParamFunc: flags.Set,
2930
}.Run(func(plugin *protogen.Plugin) error {
31+
plugin.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
3032
return genaip.Run(plugin, genaip.Config{
3133
IncludeResourceDefinitions: *includeResourceDefinitions,
3234
})

0 commit comments

Comments
 (0)