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:
22
vendor/google.golang.org/protobuf/internal/filedesc/editions.go
generated
vendored
22
vendor/google.golang.org/protobuf/internal/filedesc/editions.go
generated
vendored
@ -14,9 +14,13 @@ import (
|
||||
)
|
||||
|
||||
var defaultsCache = make(map[Edition]EditionFeatures)
|
||||
var defaultsKeys = []Edition{}
|
||||
|
||||
func init() {
|
||||
unmarshalEditionDefaults(editiondefaults.Defaults)
|
||||
SurrogateProto2.L1.EditionFeatures = getFeaturesFor(EditionProto2)
|
||||
SurrogateProto3.L1.EditionFeatures = getFeaturesFor(EditionProto3)
|
||||
SurrogateEdition2023.L1.EditionFeatures = getFeaturesFor(Edition2023)
|
||||
}
|
||||
|
||||
func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures {
|
||||
@ -104,12 +108,15 @@ func unmarshalEditionDefault(b []byte) {
|
||||
v, m := protowire.ConsumeBytes(b)
|
||||
b = b[m:]
|
||||
switch num {
|
||||
case genid.FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number:
|
||||
case genid.FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number:
|
||||
fs = unmarshalFeatureSet(v, fs)
|
||||
case genid.FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number:
|
||||
fs = unmarshalFeatureSet(v, fs)
|
||||
}
|
||||
}
|
||||
}
|
||||
defaultsCache[ed] = fs
|
||||
defaultsKeys = append(defaultsKeys, ed)
|
||||
}
|
||||
|
||||
func unmarshalEditionDefaults(b []byte) {
|
||||
@ -135,8 +142,15 @@ func unmarshalEditionDefaults(b []byte) {
|
||||
}
|
||||
|
||||
func getFeaturesFor(ed Edition) EditionFeatures {
|
||||
if def, ok := defaultsCache[ed]; ok {
|
||||
return def
|
||||
match := EditionUnknown
|
||||
for _, key := range defaultsKeys {
|
||||
if key > ed {
|
||||
break
|
||||
}
|
||||
match = key
|
||||
}
|
||||
panic(fmt.Sprintf("unsupported edition: %v", ed))
|
||||
if match == EditionUnknown {
|
||||
panic(fmt.Sprintf("unsupported edition: %v", ed))
|
||||
}
|
||||
return defaultsCache[match]
|
||||
}
|
||||
|
Reference in New Issue
Block a user