go-admin
go-admin copied to clipboard
Fix:err is never used
Fix the problem that err is overwritten and becomes invalid
🤔 This is a ...
- [ ] New feature
- [x] Bug fix
- [ ] Site / documentation update
- [ ] Demo update
- [ ] Component style update
- [ ] TypeScript definition update
- [ ] Bundle size optimization
- [ ] Performance optimization
- [ ] Enhancement feature
- [ ] Internationalization
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Test Case
- [ ] Branch merge
- [ ] Other (about what?)
🔗 Related issue link
💡 Background and solution
coding have warnang: err is never used,Therefore, this problem was discovered and modified
📝 Changelog
Language | Changelog |
---|---|
🇺🇸 English | Add a new err variable to api.GetHourDiffer under other to receive the returns of the two calls respectively, and ignore the err (sysInfo, err := host.Info() ) that is not used in the original logic of apis.ServerInfo |
🇨🇳 Chinese | 为other下的api.GetHourDiffer 增加新的err变量,分别接收两次调用的返回,忽略掉apis.ServerInfo 在原有逻辑中未使用的err(sysInfo, err := host.Info() ) |
☑️ Self-Check before Merge
⚠️ Please check all items below before review. ⚠️
- [x] Doc is updated/provided or not needed
- [x] Demo is updated/provided or not needed
- [x] TypeScript's definition is updated/provided or not needed
- [x] Changelog is provided or not needed