oracle/oci-cloud-controller-manager

Need to check whether the variable is nil

Open

#340 建立於 2021年1月7日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Go (104 fork)auto 404
good first issue

倉庫指標

Star
 (157 star)
PR 合併指標
 (PR 指標待抓取)

描述

According to line 89, resq may be nil, and resp.Body in line 96 will cause a crash. By reading the previous code, resq cannot be nil, so we can remove the comparison in line 89. https://github.com/oracle/oci-cloud-controller-manager/blob/220ab897fd3e8b1bd4b6b6d13a072f477453c073/pkg/oci/instance/metadata/instance_metadata.go#L89-L96

貢獻者指南