github-vet / github-vet/rangeloop-pointer-findings

JayceQ/golang-awesome: crawler/engine/concurrent.go; 3 LoC

Open
#15,119 0 comments 0 reactions 0 assignees View on GitHub
fresh tiny
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
PR metrics pending

Description

Found a possible issue in [JayceQ/golang-awesome](https://www.github.com/JayceQ/golang-awesome) at [crawler/engine/concurrent.go](https://github.com/JayceQ/golang-awesome/blob/f3c9a196edbdbcf2689d0149a1079577e443f5fb/crawler/engine/concurrent.go#L43-L45)

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 item used in defer or goroutine at line 44

[Click here to see the code in its original context.](https://github.com/JayceQ/golang-awesome/blob/f3c9a196edbdbcf2689d0149a1079577e443f5fb/crawler/engine/concurrent.go#L43-L45)

Click here to show the 3 line(s) of Go which triggered the analyzer.

```go
for _, item:= range result.Items{
go func() {c.ItemChan <- item}()
}

```

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: f3c9a196edbdbcf2689d0149a1079577e443f5fb

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with crawler/engine/concurrent.go at lines 43–45 and read the analyzer report about the range-loop variable used in the goroutine. Determine whether this instance is a bug, mitigated, or desirable behavior, then leave the corresponding reaction as requested.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.