build(deps): bump the golang group across 1 directory with 4 updates
Bumps the golang group with 2 updates in the / directory: [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) and [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo). Updates `github.com/Microsoft/hcsshim` from 0.12.4 to 0.12.6 - [Release notes](https://github.com/Microsoft/hcsshim/releases) - [Commits](https://github.com/Microsoft/hcsshim/compare/v0.12.4...v0.12.6) Updates `github.com/onsi/ginkgo/v2` from 2.19.0 to 2.20.1 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.19.0...v2.20.1) Updates `github.com/onsi/gomega` from 1.33.1 to 1.34.1 - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.33.1...v1.34.1) Updates `golang.org/x/sys` from 0.21.0 to 0.23.0 - [Commits](https://github.com/golang/sys/compare/v0.21.0...v0.23.0) --- updated-dependencies: - dependency-name: github.com/Microsoft/hcsshim dependency-type: direct:production update-type: version-update:semver-patch dependency-group: golang - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
21
vendor/google.golang.org/protobuf/internal/errors/errors.go
generated
vendored
21
vendor/google.golang.org/protobuf/internal/errors/errors.go
generated
vendored
@ -17,7 +17,7 @@ var Error = errors.New("protobuf error")
|
||||
|
||||
// New formats a string according to the format specifier and arguments and
|
||||
// returns an error that has a "proto" prefix.
|
||||
func New(f string, x ...interface{}) error {
|
||||
func New(f string, x ...any) error {
|
||||
return &prefixError{s: format(f, x...)}
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error {
|
||||
|
||||
// Wrap returns an error that has a "proto" prefix, the formatted string described
|
||||
// by the format specifier and arguments, and a suffix of err. The error wraps err.
|
||||
func Wrap(err error, f string, x ...interface{}) error {
|
||||
func Wrap(err error, f string, x ...any) error {
|
||||
return &wrapError{
|
||||
s: format(f, x...),
|
||||
err: err,
|
||||
@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool {
|
||||
return target == Error
|
||||
}
|
||||
|
||||
func format(f string, x ...interface{}) string {
|
||||
func format(f string, x ...any) string {
|
||||
// avoid "proto: " prefix when chaining
|
||||
for i := 0; i < len(x); i++ {
|
||||
switch e := x[i].(type) {
|
||||
@ -87,3 +87,18 @@ func InvalidUTF8(name string) error {
|
||||
func RequiredNotSet(name string) error {
|
||||
return New("required field %v not set", name)
|
||||
}
|
||||
|
||||
type SizeMismatchError struct {
|
||||
Calculated, Measured int
|
||||
}
|
||||
|
||||
func (e *SizeMismatchError) Error() string {
|
||||
return fmt.Sprintf("size mismatch (see https://github.com/golang/protobuf/issues/1609): calculated=%d, measured=%d", e.Calculated, e.Measured)
|
||||
}
|
||||
|
||||
func MismatchedSizeCalculation(calculated, measured int) error {
|
||||
return &SizeMismatchError{
|
||||
Calculated: calculated,
|
||||
Measured: measured,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user