This commit is contained in:
2025-04-17 00:10:46 +08:00
parent 52bfd05b80
commit 26d183f4c9
8 changed files with 94 additions and 9 deletions

View File

@@ -14,6 +14,8 @@ import (
)
func Generate(request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error) {
AllSrvMethods = make([]SrvMethod, 0)
generate := make(map[string]struct{})
registry, err := protodesc.NewFiles(&descriptorpb.FileDescriptorSet{
File: request.GetProtoFile(),
@@ -46,7 +48,10 @@ func Generate(request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorRe
Name: proto.String(path.Join(indexPathElems...)),
Content: proto.String(string(index.Content())),
})
}
res.SupportedFeatures = proto.Uint64(uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL))
return &res, nil
}