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

socketplane/socketplane: Godeps/_workspace/src/github.com/socketplane/bonjour/bonjour.go; 5 LoC

Open
#17,195 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 [socketplane/socketplane](https://www.github.com/socketplane/socketplane) at [Godeps/_workspace/src/github.com/socketplane/bonjour/bonjour.go](https://github.com/socketplane/socketplane/blob/bc8b7e0e5ddf354c857a77b5cdfb904540026373/Godeps/_workspace/src/github.com/socketplane/bonjour/bonjour.go#L138-L142)

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.

> function call which takes a reference to bIntf at line 139 may start a goroutine

[Click here to see the code in its original context.](https://github.com/socketplane/socketplane/blob/bc8b7e0e5ddf354c857a77b5cdfb904540026373/Godeps/_workspace/src/github.com/socketplane/bonjour/bonjour.go#L138-L142)

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

```go
for _, bIntf := range ifaces {
if IsInterfaceEligible(&bIntf) {
eligibleIfaces = append(eligibleIfaces, &bIntf)
}
}

```

Click here to show extra information the analyzer produced.

```
The following graphviz dot graph describes paths through the callgraph that could lead to a function calling a goroutine:
digraph G {
"(IsInterfaceEligible, 1)" -> {"(echo, 2)";}
"(echo, 2)" -> {}
}

```

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Read Godeps/_workspace/src/github.com/socketplane/bonjour/bonjour.go at lines 138-142, then inspect IsInterfaceEligible and the surrounding range-loop usage. Compare the analyzer warning with the referenced code and classify the finding as Bug, Mitigated, or Desirable Behavior using the issue's reaction instructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.