SevereCloud/vksdk: events/events.go; 7 LoC

Open Beginner friendly
#16,915 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go
Domain
backend

Research direction

Inspect events/events.go at lines 218-224 and read the range-loop closure warning in the issue. Determine whether the goroutine can use the wrong callback, then verify the finding against the surrounding event-dispatch logic and leave the appropriate classification reaction.

Written by the indexing model from the issue text.

Description

fresh tiny

Found a possible issue in SevereCloud/vksdk at events/events.go

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 f used in defer or goroutine at line 220

Click here to see the code in its original context.

Click here to show the 7 line(s) of Go which triggered the analyzer.
		for _, f := range fl.messageAllow {
			if fl.goroutine {
				go func() { f(ctx, obj) }()
			} else {
				f(ctx, obj)
			}
		}

Leave a reaction on this issue to contribute to the project by classifying this instance as a Bug 👎, Mitigated 👍, or Desirable Behavior 🚀
See the descriptions of the classifications here for more information.

commit ID: 691e87e001d589843dc43441a2d4b2a82e8972ce

Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
PR metrics pending

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github-vet/rangeloop-pointer-findings

All issues in github-vet/rangeloop-pointer-findings

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.