fix: fix staticcheck errors - errors.Is parameter order and deprecated ioutil

This commit is contained in:
2026-04-19 23:43:33 +08:00
parent 35e37a8142
commit 1685aa4428
11 changed files with 40 additions and 40 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ func (service sessionService) Create(clientIp, assetId, mode string, user *model
if strategyId != "" {
strategy, err := repository.StrategyRepository.FindById(context.TODO(), strategyId)
if err != nil {
if !errors.Is(gorm.ErrRecordNotFound, err) {
if !errors.Is(err, gorm.ErrRecordNotFound) {
return nil, err
}
} else {