Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com> Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com> Kubernetes-commit: 95860cff1c418ea6f5494e4a6168e7acd1c390ec
This commit is contained in:
parent
7d77d3c2dd
commit
17ab6c21d5
|
@ -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