github-vet / github-vet/rangeloop-pointer-findings
workmachine/crowd-sh: task.go; 22 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [workmachine/crowd-sh](https://www.github.com/workmachine/crowd-sh) at [task.go](https://github.com/workmachine/crowd-sh/blob/0008a32350646d376291951ce2f0c230e4162987/task.go#L40-L61)
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.
> reference to ft is reassigned at line 49
[Click here to see the code in its original context.](https://github.com/workmachine/crowd-sh/blob/0008a32350646d376291951ce2f0c230e4162987/task.go#L40-L61)
Click here to show the 22 line(s) of Go which triggered the analyzer.
```go
for _, ft := range t.workflow.FieldTypes {
if ft.Name == MTurkHitIDField {
continue
}
var field *Field
for k, v := range t.Fields {
if ft.Name == k {
field = &ft
field.Value = v
}
}
if field == nil {
field = &ft
}
log.Println(field)
fieldsHTML += field.HTML()
}
```
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: 0008a32350646d376291951ce2f0c230e4162987
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.