aboutsummaryrefslogtreecommitdiffstats
path: root/models/db
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-10-20 22:37:19 +0800
committerGitHub <noreply@github.com>2021-10-20 16:37:19 +0200
commitf494776931b71f83fdfdd4e68e850529c4b2614f (patch)
tree92b3779237dadfe042d3f93e9ddaaaac5d6d385f /models/db
parent0208ea0248782a994771cadf0af6a4125fdde723 (diff)
downloadgitea-f494776931b71f83fdfdd4e68e850529c4b2614f.tar.gz
gitea-f494776931b71f83fdfdd4e68e850529c4b2614f.zip
Use a variable but a function for IsProd because of a slight performance increment (#17368)
Diffstat (limited to 'models/db')
-rwxr-xr-xmodels/db/engine.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/db/engine.go b/models/db/engine.go
index 256eb2f3fc..78b4ac22dd 100755
--- a/models/db/engine.go
+++ b/models/db/engine.go
@@ -136,8 +136,8 @@ func NewTestEngine() (err error) {
}
x.SetMapper(names.GonicMapper{})
- x.SetLogger(NewXORMLogger(!setting.IsProd()))
- x.ShowSQL(!setting.IsProd())
+ x.SetLogger(NewXORMLogger(!setting.IsProd))
+ x.ShowSQL(!setting.IsProd)
return syncTables()
}