github-vet / github-vet/rangeloop-pointer-findings
zwcui/baseMircoApi: taskservice/task/liveTask.go; 25 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [zwcui/baseMircoApi](https://www.github.com/zwcui/baseMircoApi) at [taskservice/task/liveTask.go](https://github.com/zwcui/baseMircoApi/blob/727407c592608a0b30883b9b89b93ca259952c14/taskservice/task/liveTask.go#L22-L46)
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/zwcui/baseMircoApi/blob/727407c592608a0b30883b9b89b93ca259952c14/taskservice/task/liveTask.go#L22-L46)
Click here to show the 25 line(s) of Go which triggered the analyzer.
```go
for _, live := range liveList{
live.Status = 3
base.DBEngine.Table("live").Where("id = ?", live.Id).Cols("status").Update(&live)
//推送消息
appMessageOne := models.AppMessage{}
appMessageOne.ReceiverId = live.AuthorId
appMessageOne.ActionUrl = remote.JumpUrlWithKeyAndPramas(models.JTREVOKE_LIVE_JUMP_KEY, nil)
appMessageOne.Content = "您发布的直播超过5分钟没有开始,系统已自动取消,请重新发布直播"
appMessageOne.Type = 8
_, pushErr := remote.PushMessageToUser( live.AuthorId, &appMessageOne, "", 0)
if pushErr != nil {
util.Logger.Info("checkExpireLive pushErr = ", pushErr.Error())
}
base.DBEngine.Table("app_message").InsertOne(&appMessageOne)
//发送客服消息
var author models.Author
var dInfo models.UserSignInDeviceInfo
base.DBEngine.Table("author").Where("id =?", live.AuthorId).Get(&author)
has, _ := base.DBEngine.Table("user_sign_in_device_info").Where("author_id = ?", live.AuthorId).Get(&dInfo)
if !has {
content := "您发布的直播超过5分钟没有开始,系统已自动取消,请重新发布直播"
util.RequestSendGZHTextCustomerServiceMessage(author.Openid, content, getGZHAccessToken())
}
}
```
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: 727407c592608a0b30883b9b89b93ca259952c14
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.