oracle / oracle/oci-cloud-controller-manager
Need to check whether the variable is nil
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 158
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pkg/oci/instance/metadata/instance_metadata.go at lines 89-96 and read the preceding code to verify whether resq can be nil. Resolve the nil check as described and confirm that the resp.Body handling matches the established control flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100