github-vet / github-vet/rangeloop-pointer-findings
czcorpus/vert-tagextract: library/actions.go; 38 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [czcorpus/vert-tagextract](https://www.github.com/czcorpus/vert-tagextract) at [library/actions.go](https://github.com/czcorpus/vert-tagextract/blob/f56d92aa9bcd31d9e99b338f4c9a80d39aa4478c/library/actions.go#L107-L144)
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 verticalFile used in defer or goroutine at line 130
[Click here to see the code in its original context.](https://github.com/czcorpus/vert-tagextract/blob/f56d92aa9bcd31d9e99b338f4c9a80d39aa4478c/library/actions.go#L107-L144)
Click here to show the 38 line(s) of Go which triggered the analyzer.
```go
for _, verticalFile := range filesToProc {
log.Printf("Processing vertical %s", verticalFile)
parserConf := &vertigo.ParserConf{
InputFilePath: verticalFile,
StructAttrAccumulator: "nil",
Encoding: conf.Encoding,
}
var fn colgen.AlignedColGenFn
if conf.UsesSelfJoin() {
fn = func(args map[string]interface{}) (string, error) {
ans, err := colgen.GetFuncByName(conf.SelfJoin.GeneratorFn)
if err != nil {
}
return ans(args, conf.SelfJoin.ArgColumns)
}
}
subStatusChan := make(chan proc.Status, 10)
go func() {
defer wg.Done()
for upd := range subStatusChan {
upd.File = verticalFile
statusChan <- upd
}
}()
tte, err := proc.NewTTExtractor(dbConn, conf, fn, subStatusChan, stopChan)
if err != nil {
close(subStatusChan)
sendErrStatus(statusChan, "", err)
}
err = tte.Run(parserConf)
close(subStatusChan)
if err != nil {
sendErrStatus(statusChan, verticalFile, err)
}
}
```
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: f56d92aa9bcd31d9e99b338f4c9a80d39aa4478c
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.