summaryrefslogtreecommitdiffstats
path: root/models/migrations
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-09-19 01:08:30 -0700
committerLauris BH <lauris@nix.lv>2017-09-19 11:08:30 +0300
commit4cb9394a978af75794d43accc231b6649f2884bc (patch)
tree06df979841396c51d292eb5a078ece1c8af11fd9 /models/migrations
parentd155d0e6656df7b7699a4a6b60889689d6678ef5 (diff)
downloadgitea-4cb9394a978af75794d43accc231b6649f2884bc.tar.gz
gitea-4cb9394a978af75794d43accc231b6649f2884bc.zip
Fix lint errors (#2547)
Diffstat (limited to 'models/migrations')
-rw-r--r--models/migrations/v16.go6
-rw-r--r--models/migrations/v21.go5
2 files changed, 2 insertions, 9 deletions
diff --git a/models/migrations/v16.go b/models/migrations/v16.go
index ef342a5f88..8ce37ea7db 100644
--- a/models/migrations/v16.go
+++ b/models/migrations/v16.go
@@ -119,9 +119,5 @@ func addUnitsToTables(x *xorm.Engine) error {
}
}
- if err := sess.Commit(); err != nil {
- return err
- }
-
- return nil
+ return sess.Commit()
}
diff --git a/models/migrations/v21.go b/models/migrations/v21.go
index e049727cbe..890f4de227 100644
--- a/models/migrations/v21.go
+++ b/models/migrations/v21.go
@@ -51,8 +51,5 @@ func useNewPublickeyFormat(x *xorm.Engine) error {
}
f.Close()
- if err = os.Rename(tmpPath, fpath); err != nil {
- return err
- }
- return nil
+ return os.Rename(tmpPath, fpath)
}