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:
13
vendor/google.golang.org/protobuf/compiler/protogen/protogen.go
generated
vendored
13
vendor/google.golang.org/protobuf/compiler/protogen/protogen.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user