chore: enable fmt check (#1742)

chore: enable fmt check

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1742
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
appleboy 2020-07-21 04:36:55 +00:00 committed by Lunny Xiao
parent 318102c9ff
commit fe3bc3851e
4 changed files with 3 additions and 3 deletions

View File

@ -10,6 +10,7 @@ steps:
commands:
- make vet
- make test
- make fmt-check
when:
event:
- push

View File

@ -61,4 +61,4 @@ func TestEnableSessionId(t *testing.T) {
assertSync(t, new(Userinfo))
_, err := testEngine.Table("userinfo").MustLogSQL(true).Get(new(Userinfo))
assert.NoError(t, err)
}
}

View File

@ -27,4 +27,3 @@ func SplitNNoCase(s, sep string, n int) []string {
}
return strings.SplitN(s, s[idx:idx+len(sep)], n)
}

View File

@ -102,7 +102,7 @@ func newSessionID() string {
func newSession(engine *Engine) *Session {
var ctx context.Context
if engine.logSessionID {
ctx = context.WithValue(engine.defaultContext, log.SessionIDKey, newSessionID())
ctx = context.WithValue(engine.defaultContext, log.SessionIDKey, newSessionID())
} else {
ctx = engine.defaultContext
}