go-admin icon indicating copy to clipboard operation
go-admin copied to clipboard

Fix:err is never used

Open Tiper-In-Github opened this issue 4 months ago • 0 comments

Fix the problem that err is overwritten and becomes invalid

[中文版模板 / Chinese template]

🤔 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

Tiper-In-Github avatar Sep 29 '24 07:09 Tiper-In-Github