build(deps): bump google.golang.org/protobuf from 1.33.0 to 1.34.1

Bumps google.golang.org/protobuf from 1.33.0 to 1.34.1.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2024-05-07 04:55:53 +00:00
committed by GitHub
parent 6e9273c466
commit b488e76db6
44 changed files with 1030 additions and 622 deletions

View File

@@ -19,7 +19,7 @@ import (
"go/printer"
"go/token"
"go/types"
"io/ioutil"
"io"
"os"
"path"
"path/filepath"
@@ -60,7 +60,7 @@ func run(opts Options, f func(*Plugin) error) error {
if len(os.Args) > 1 {
return fmt.Errorf("unknown argument %q (this program should be run by protoc, not directly)", os.Args[1])
}
in, err := ioutil.ReadAll(os.Stdin)
in, err := io.ReadAll(os.Stdin)
if err != nil {
return err
}
@@ -108,6 +108,9 @@ type Plugin struct {
// google.protobuf.CodeGeneratorResponse.supported_features for details.
SupportedFeatures uint64
SupportedEditionsMinimum descriptorpb.Edition
SupportedEditionsMaximum descriptorpb.Edition
fileReg *protoregistry.Files
enumsByName map[protoreflect.FullName]*Enum
messagesByName map[protoreflect.FullName]*Message
@@ -140,7 +143,7 @@ type Options struct {
// opts := &protogen.Options{
// ParamFunc: flags.Set,
// }
// protogen.Run(opts, func(p *protogen.Plugin) error {
// opts.Run(func(p *protogen.Plugin) error {
// if *value { ... }
// })
ParamFunc func(name, value string) error
@@ -396,6 +399,10 @@ func (gen *Plugin) Response() *pluginpb.CodeGeneratorResponse {
if gen.SupportedFeatures > 0 {
resp.SupportedFeatures = proto.Uint64(gen.SupportedFeatures)
}
if gen.SupportedEditionsMinimum != descriptorpb.Edition_EDITION_UNKNOWN && gen.SupportedEditionsMaximum != descriptorpb.Edition_EDITION_UNKNOWN {
resp.MinimumEdition = proto.Int32(int32(gen.SupportedEditionsMinimum))
resp.MaximumEdition = proto.Int32(int32(gen.SupportedEditionsMaximum))
}
return resp
}