github-vet / github-vet/rangeloop-pointer-findings
fenriz07/sitemap-inverse: main.go; 25 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [fenriz07/sitemap-inverse](https://www.github.com/fenriz07/sitemap-inverse) at [main.go](https://github.com/fenriz07/sitemap-inverse/blob/e3cafa37d6b29272443385af7481147397a7d100/main.go#L66-L90)
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 url used in defer or goroutine at line 81
[Click here to see the code in its original context.](https://github.com/fenriz07/sitemap-inverse/blob/e3cafa37d6b29272443385af7481147397a7d100/main.go#L66-L90)
Click here to show the 25 line(s) of Go which triggered the analyzer.
```go
for url, _ := range q {
/* con la linea # podemos comprobar si la llave existe en el mapa.
Si dicha llave existe quiere decir que la url fue analizada */
if _, ok := seen[url]; ok {
continue
}
lenchanel++
/* Se le asigna el link que se va a analizar, para que no pueda ser analizado
en un futuro */
seen[url] = struct{}{}
go func() {
links := get(url, false)
linkChanel <- links
}()
/*Se prepara nq con los valores obtenidos que posteriormente se analizaran*/
/*for _, link := range links {
nq[link] = struct{}{}
}*/
}
```
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: e3cafa37d6b29272443385af7481147397a7d100
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.