github-vet / github-vet/rangeloop-pointer-findings
uadmin/uadmin: setting.go; 25 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [uadmin/uadmin](https://www.github.com/uadmin/uadmin) at [setting.go](https://github.com/uadmin/uadmin/blob/d5dfd4d360e4eccb4a881bc5fe71d65affb14847/setting.go#L813-L837)
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/uadmin/uadmin/blob/d5dfd4d360e4eccb4a881bc5fe71d65affb14847/setting.go#L813-L837)
Click here to show the 25 line(s) of Go which triggered the analyzer.
```go
for i, setting := range settings {
Trail(WORKING, "Synching System Settings: [%s%d/%d%s]", colors.FGGreenB, i+1, len(settings), colors.FGNormal)
s = Setting{}
for c := range sList {
if sList[c].Code == setting.Code {
s = sList[c]
}
}
if s.ID == 0 {
tx.Create(&setting)
//setting.Save()
} else {
if s.DefaultValue != setting.DefaultValue || s.Help != setting.Help {
if s.Help != setting.Help {
s.Help = setting.Help
}
if s.Value == s.DefaultValue {
s.Value = setting.DefaultValue
}
s.DefaultValue = setting.DefaultValue
tx.Save(s)
//s.Save()
}
}
}
```
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 {Create 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: d5dfd4d360e4eccb4a881bc5fe71d65affb14847
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect setting.go lines 813-837 in the referenced commit and read the analyzer details, noting that no specific message was reported. Determine whether the finding is a bug, mitigated, or desirable behavior; the issue is complete when the appropriate classification is recorded by reaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100