github-vet / github-vet/rangeloop-pointer-findings
Lonely7th/JServer: colly/colly_manager.go; 26 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [Lonely7th/JServer](https://www.github.com/Lonely7th/JServer) at [colly/colly_manager.go](https://github.com/Lonely7th/JServer/blob/a622062f8c08552b104885c714440189c82423c2/colly/colly_manager.go#L72-L97)
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.
>
[Click here to see the code in its original context.](https://github.com/Lonely7th/JServer/blob/a622062f8c08552b104885c714440189c82423c2/colly/colly_manager.go#L72-L97)
Click here to show the 26 line(s) of Go which triggered the analyzer.
```go
for _, item := range *noteList {
fmt.Println(item)
//随机发布人信息
releaser := models.GetRandReleaser()
if releaser != nil {
//加载图片
picRes, gsRes, err := LoadNetPic(releaser.UserNo, item.ResPath)
if err == nil {
//随机NoteType
ntype := GetRandNoteType()
//随机限制长度
limit := GetRandLimitNum()
//随机裁剪格式
format := GetRandFormat()
//随机标签
label1, label2, label3, labelTitle1, labelTitle2, labelTitle3 := GetRandLabels(item.Content)
models.AddJNote("我发布了一条新动态,快来点击看看吧~", releaser.UserNo, picRes, gsRes, ntype, limit,
false, format, label1, label2, label3, labelTitle1, labelTitle2, labelTitle3)
//将工厂设置成已发布
item.Released = true
o.Update(&item)
} else {
fmt.Println(err)
}
}
}
```
Click here to show extra information the analyzer produced.
```
No path was found through the callgraph that could lead to a function which writes a pointer argument.
No path was found through the callgraph that could lead to a function which passes a pointer to third-party code.
root signature {Update 1} was not found in the callgraph; reference was passed directly to third-party code
```
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: a622062f8c08552b104885c714440189c82423c2
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.