mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-05-21 08:36:33 +00:00
Update dependencies
This commit is contained in:
2
vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json
generated
vendored
2
vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json
generated
vendored
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"v2": "2.12.1"
|
||||
"v2": "2.12.2"
|
||||
}
|
||||
|
||||
7
vendor/github.com/googleapis/gax-go/v2/CHANGES.md
generated
vendored
7
vendor/github.com/googleapis/gax-go/v2/CHANGES.md
generated
vendored
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## [2.12.2](https://github.com/googleapis/gax-go/compare/v2.12.1...v2.12.2) (2024-02-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **v2/callctx:** fix SetHeader race by cloning header map ([#326](https://github.com/googleapis/gax-go/issues/326)) ([534311f](https://github.com/googleapis/gax-go/commit/534311f0f163d101f30657736c0e6f860e9c39dc))
|
||||
|
||||
## [2.12.1](https://github.com/googleapis/gax-go/compare/v2.12.0...v2.12.1) (2024-02-13)
|
||||
|
||||
|
||||
|
||||
18
vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go
generated
vendored
18
vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go
generated
vendored
@@ -74,9 +74,27 @@ func SetHeaders(ctx context.Context, keyvals ...string) context.Context {
|
||||
h, ok := ctx.Value(headerKey).(map[string][]string)
|
||||
if !ok {
|
||||
h = make(map[string][]string)
|
||||
} else {
|
||||
h = cloneHeaders(h)
|
||||
}
|
||||
|
||||
for i := 0; i < len(keyvals); i = i + 2 {
|
||||
h[keyvals[i]] = append(h[keyvals[i]], keyvals[i+1])
|
||||
}
|
||||
return context.WithValue(ctx, headerKey, h)
|
||||
}
|
||||
|
||||
// cloneHeaders makes a new key-value map while reusing the value slices.
|
||||
// As such, new values should be appended to the value slice, and modifying
|
||||
// indexed values is not thread safe.
|
||||
//
|
||||
// TODO: Replace this with maps.Clone when Go 1.21 is the minimum version.
|
||||
func cloneHeaders(h map[string][]string) map[string][]string {
|
||||
c := make(map[string][]string, len(h))
|
||||
for k, v := range h {
|
||||
vc := make([]string, len(v))
|
||||
copy(vc, v)
|
||||
c[k] = vc
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
2
vendor/github.com/googleapis/gax-go/v2/internal/version.go
generated
vendored
2
vendor/github.com/googleapis/gax-go/v2/internal/version.go
generated
vendored
@@ -30,4 +30,4 @@
|
||||
package internal
|
||||
|
||||
// Version is the current tagged release of the library.
|
||||
const Version = "2.12.1"
|
||||
const Version = "2.12.2"
|
||||
|
||||
Reference in New Issue
Block a user