Merge pull request #127422 from srivastav-abhishek/go-vet-fix
Go vet fixes for gotip Kubernetes-commit: f2700895a4315014c56bfe1db7fb1562a61a8b50
This commit is contained in:
commit
3f8a6ad61c
2
go.mod
2
go.mod
|
@ -51,7 +51,7 @@ require (
|
|||
gopkg.in/square/go-jose.v2 v2.6.0
|
||||
k8s.io/api v0.0.0-20240918001733-e14a61a8c7c2
|
||||
k8s.io/apimachinery v0.0.0-20240919081406-f7615f37d717
|
||||
k8s.io/client-go v0.0.0-20240917205444-4f57ad32047b
|
||||
k8s.io/client-go v0.0.0-20240920162441-40a93af7883a
|
||||
k8s.io/component-base v0.0.0-20240918042634-49269eb05058
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
k8s.io/kms v0.0.0-20240912041232-273c893e4e51
|
||||
|
|
4
go.sum
4
go.sum
|
@ -375,8 +375,8 @@ k8s.io/api v0.0.0-20240918001733-e14a61a8c7c2 h1:Aoezaxq3CoE7uIcQal4PEUL9P+AQPDj
|
|||
k8s.io/api v0.0.0-20240918001733-e14a61a8c7c2/go.mod h1:peFini8XRw/7apbDOFTp0ZPE50xez1sCjfkRipDXJFQ=
|
||||
k8s.io/apimachinery v0.0.0-20240919081406-f7615f37d717 h1:V7v1okd1jE7GKWP5FcvNwFSM/QGNilNMVNii/uB08+8=
|
||||
k8s.io/apimachinery v0.0.0-20240919081406-f7615f37d717/go.mod h1:5rKPDwwN9qm//xASFCZ83nyYEanHxxhc7pZ8AC4lukY=
|
||||
k8s.io/client-go v0.0.0-20240917205444-4f57ad32047b h1:qNJBkiH/PYHfreCjRi5e9yoCDlb2p4htEvMJeD8GK3Q=
|
||||
k8s.io/client-go v0.0.0-20240917205444-4f57ad32047b/go.mod h1:SHqrcQOS6L0CtlGn8DlOEAVxhSHlLqbNwD15CEqWSKU=
|
||||
k8s.io/client-go v0.0.0-20240920162441-40a93af7883a h1:Np0dBBK1HdqJKipNYe4ZFlMw1gv0egfJJDLeXbaL55s=
|
||||
k8s.io/client-go v0.0.0-20240920162441-40a93af7883a/go.mod h1:rydS34AEFNObhHYAXSdGIdElCTAZ4h6O7VH5Wkep79s=
|
||||
k8s.io/component-base v0.0.0-20240918042634-49269eb05058 h1:8soliJr5YLVB+pJtR12WtJFL1TWoFYBw5ANH3tp9j+s=
|
||||
k8s.io/component-base v0.0.0-20240918042634-49269eb05058/go.mod h1:0TUNldelE6cElcpnJjf1+LVBIZkcUsVXDbj1Xsqj+EI=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
|
|
|
@ -60,7 +60,7 @@ func TestLazyMapType(t *testing.T) {
|
|||
evalCounter++
|
||||
v, err := compileAndRun(env, activation, `{"a": "a"}`)
|
||||
if err != nil {
|
||||
return types.NewErr(err.Error())
|
||||
return types.NewErr("%s", err.Error())
|
||||
}
|
||||
return v
|
||||
})
|
||||
|
|
|
@ -2818,7 +2818,7 @@ func TestDeleteWithOptions(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
t.Logf(string(s))
|
||||
t.Log(string(s))
|
||||
}
|
||||
if simpleStorage.deleted != ID {
|
||||
t.Errorf("Unexpected delete: %s, expected %s", simpleStorage.deleted, ID)
|
||||
|
@ -2858,7 +2858,7 @@ func TestDeleteWithOptionsQuery(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
t.Logf(string(s))
|
||||
t.Log(string(s))
|
||||
}
|
||||
if simpleStorage.deleted != ID {
|
||||
t.Fatalf("Unexpected delete: %s, expected %s", simpleStorage.deleted, ID)
|
||||
|
@ -2901,7 +2901,7 @@ func TestDeleteWithOptionsQueryAndBody(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
t.Logf(string(s))
|
||||
t.Log(string(s))
|
||||
}
|
||||
if simpleStorage.deleted != ID {
|
||||
t.Errorf("Unexpected delete: %s, expected %s", simpleStorage.deleted, ID)
|
||||
|
|
|
@ -326,7 +326,7 @@ func TestSerializeObject(t *testing.T) {
|
|||
compressionEnabled: true,
|
||||
statusCode: http.StatusInternalServerError,
|
||||
out: smallPayload,
|
||||
outErrs: []error{fmt.Errorf(string(largePayload)), fmt.Errorf("bad2")},
|
||||
outErrs: []error{errors.New(string(largePayload)), errors.New("bad2")},
|
||||
mediaType: "application/json",
|
||||
req: &http.Request{
|
||||
Header: http.Header{
|
||||
|
|
|
@ -50,7 +50,7 @@ var (
|
|||
func handleError(w http.ResponseWriter, r *http.Request, err error) {
|
||||
errorMsg := fmt.Sprintf("Internal Server Error: %#v", r.RequestURI)
|
||||
http.Error(w, errorMsg, http.StatusInternalServerError)
|
||||
klog.Errorf(err.Error())
|
||||
klog.Error(err.Error())
|
||||
}
|
||||
|
||||
// requestWatermark is used to track maximal numbers of requests in a particular phase of handling
|
||||
|
|
|
@ -1610,7 +1610,7 @@ func verifyEvents(t *testing.T, w watch.Interface, events []watch.Event, strictO
|
|||
if !valid {
|
||||
t.Logf("(called from line %d)", line)
|
||||
for _, err := range errors {
|
||||
t.Errorf(err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ func (h *peerProxyHandler) WrapHandler(handler http.Handler) http.Handler {
|
|||
// TODO: maintain locally serviceable GVRs somewhere so that we dont have to
|
||||
// consult the storageversion-informed map for those
|
||||
if len(serviceableByResp.peerEndpoints) == 0 {
|
||||
klog.Errorf(fmt.Sprintf("GVR %v is not served by anything in this cluster", gvr))
|
||||
klog.Error(fmt.Sprintf("GVR %v is not served by anything in this cluster", gvr))
|
||||
handler.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue