github-vet / github-vet/rangeloop-pointer-findings
rosshendrickson-wf/education: talks/2015-10-21-debug/debug/slide2.go; 11 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [rosshendrickson-wf/education](https://www.github.com/rosshendrickson-wf/education) at [talks/2015-10-21-debug/debug/slide2.go](https://github.com/rosshendrickson-wf/education/blob/bab45629d081c965a76784afe3d5aa96bd94feb7/talks/2015-10-21-debug/debug/slide2.go#L9-L19)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> range-loop variable i used in defer or goroutine at line 12
[Click here to see the code in its original context.](https://github.com/rosshendrickson-wf/education/blob/bab45629d081c965a76784afe3d5aa96bd94feb7/talks/2015-10-21-debug/debug/slide2.go#L9-L19)
Click here to show the 11 line(s) of Go which triggered the analyzer.
```go
for i, char := range "AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH BATMAN" {
go func() {
print(i)
print(char)
if i%2 == 0 {
print(a[10001010])
}
}()
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: bab45629d081c965a76784afe3d5aa96bd94feb7
Contributor guide
No contributing guide indexed for this repository
Research direction
Read talks/2015-10-21-debug/debug/slide2.go, focusing on the range loop and goroutine that use i and char. Decide whether the analyzer finding represents a Bug, Mitigated case, or Desirable Behavior, using the classification descriptions linked in the issue. Leave the corresponding reaction when the classification is clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100