diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-21 13:39:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-21 13:39:32 +0800 |
commit | 5843038a0812cc133c1895b7410aeda7153e8708 (patch) | |
tree | 3515998242443e1a82217ee4702603819c5315c8 /internal/db/migrations/migrations.go | |
parent | 958d8b6bb4c2da66859325695b91d871e567a4fa (diff) |
workflows: enable golangci-lint (#5998)
* Create golint.yml
* Update golint.yml
* Update golint.yml
* Fix errcheck
* Fix gosimple
* Fix staticcheck
Diffstat (limited to 'internal/db/migrations/migrations.go')
-rw-r--r-- | internal/db/migrations/migrations.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/migrations/migrations.go b/internal/db/migrations/migrations.go index a4f47441..dce1476d 100644 --- a/internal/db/migrations/migrations.go +++ b/internal/db/migrations/migrations.go @@ -337,7 +337,7 @@ func convertDateToUnix(x *xorm.Engine) (err error) { offset := 0 for { beans := make([]*Bean, 0, 100) - if err = x.Sql(fmt.Sprintf("SELECT * FROM `%s` ORDER BY id ASC LIMIT 100 OFFSET %d", + if err = x.SQL(fmt.Sprintf("SELECT * FROM `%s` ORDER BY id ASC LIMIT 100 OFFSET %d", table.name, offset)).Find(&beans); err != nil { return fmt.Errorf("select beans [table: %s, offset: %d]: %v", table.name, offset, err) } |