...
1 package codegenerator
2
3 import (
4 "google.golang.org/protobuf/compiler/protogen"
5 "google.golang.org/protobuf/types/pluginpb"
6 )
7
8 func supportedCodeGeneratorFeatures() uint64 {
9
10 return uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
11 }
12
13
14
15 func SetSupportedFeaturesOnPluginGen(gen *protogen.Plugin) {
16 gen.SupportedFeatures = supportedCodeGeneratorFeatures()
17 }
18
19
20
21 func SetSupportedFeaturesOnCodeGeneratorResponse(resp *pluginpb.CodeGeneratorResponse) {
22 sf := supportedCodeGeneratorFeatures()
23 resp.SupportedFeatures = &sf
24 }
25
View as plain text