Update github.com/pkg/errors to go native errors pkg

Signed-off-by: Sahil Raja <sahil.raja@mayadata.io>
This commit is contained in:
Sahil Raja
2021-06-21 23:03:14 +05:30
parent 99c35dc37c
commit 8eee78a61f
3 changed files with 4 additions and 6 deletions

View File

@@ -23,7 +23,6 @@ import (
restful "github.com/emicklei/go-restful"
cadvisorapi "github.com/google/cadvisor/info/v1"
cadvisorv2 "github.com/google/cadvisor/info/v2"
"github.com/pkg/errors"
"k8s.io/klog/v2"
"k8s.io/api/core/v1"
@@ -143,7 +142,7 @@ func (h *handler) handleSummary(request *restful.Request, response *restful.Resp
onlyCPUAndMemory := false
err := request.Request.ParseForm()
if err != nil {
handleError(response, "/stats/summary", errors.Wrapf(err, "parse form failed"))
handleError(response, "/stats/summary", fmt.Errorf("parse form failed: %w", err))
return
}
if onlyCluAndMemoryParam, found := request.Request.Form["only_cpu_and_memory"]; found &&