Fix errcheck warnings

Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
z1cheng 2023-06-28 16:10:39 +00:00 committed by k8s-infra-cherrypick-robot
parent 236a41a23b
commit 2bbd69e0d9
27 changed files with 207 additions and 70 deletions

View file

@ -76,7 +76,9 @@ var _ = framework.IngressNginxDescribeSerial("[TopologyHints] topology aware rou
status, err := f.ExecIngressPod(curlCmd)
assert.Nil(ginkgo.GinkgoT(), err)
var backends []map[string]interface{}
json.Unmarshal([]byte(status), &backends)
if err := json.Unmarshal([]byte(status), &backends); err != nil {
assert.Nil(ginkgo.GinkgoT(), err)
}
gotBackends := 0
for _, bck := range backends {
if strings.Contains(bck["name"].(string), "topology") {