Cleanup errcheck code (#10166)

Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
Chen Chen 2023-07-06 19:31:03 +08:00 committed by GitHub
parent d44a8e0045
commit ff0cb504d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 24 deletions

View file

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