github-vet / github-vet/rangeloop-pointer-findings
shubhodeep9/go-MyVIT: api/scrape/facsearch.go; 19 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [shubhodeep9/go-MyVIT](https://www.github.com/shubhodeep9/go-MyVIT) at [api/scrape/facsearch.go](https://github.com/shubhodeep9/go-MyVIT/blob/354d517b2dcea48976559d38f2e73ac2da27387a/api/scrape/facsearch.go#L116-L134)
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 v used in defer or goroutine at line 126
[Click here to see the code in its original context.](https://github.com/shubhodeep9/go-MyVIT/blob/354d517b2dcea48976559d38f2e73ac2da27387a/api/scrape/facsearch.go#L116-L134)
Click here to show the 19 line(s) of Go which triggered the analyzer.
```go
for _, v := range links {
//mutex.Lock()
var re sync.WaitGroup
re.Add(1)
//messages := make(chan int)
go func() {
defer re.Done()
scrapeIt(v, bow)
runtime.Goexit()
//messages <- 1
}()
re.Wait()
//mutex.Unlock()
}
```
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: 354d517b2dcea48976559d38f2e73ac2da27387a
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect api/scrape/facsearch.go at lines 116-134 and review the analyzer report about the range-loop variable used in the goroutine. Decide whether this instance should be classified as Bug, Mitigated, or Desirable Behavior, then leave the corresponding reaction on the issue.
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
- 45/100