vendor: use github.com/prometheus/common v0.47.0

By using a newer prometheus/common package, there are undefined
references which cause the following golangci-lint error:

> Running error: can't run linter goanalysis_metalinter\ninspect: failed
> to load package util: could not load export data: no export data for
> \"k8s.io/kubernetes/pkg/controller/deployment/util\"

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2024-06-27 17:03:19 +02:00
committed by mergify[bot]
parent 34228c6d0b
commit d9c8a2abc7
39 changed files with 176 additions and 10105 deletions

View File

@ -1,13 +0,0 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build appengine
package internal
import "google.golang.org/appengine/urlfetch"
func init() {
appengineClientHook = urlfetch.Client
}

View File

@ -18,16 +18,11 @@ var HTTPClient ContextKey
// because nobody else can create a ContextKey, being unexported.
type ContextKey struct{}
var appengineClientHook func(context.Context) *http.Client
func ContextClient(ctx context.Context) *http.Client {
if ctx != nil {
if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok {
return hc
}
}
if appengineClientHook != nil {
return appengineClientHook(ctx)
}
return http.DefaultClient
}