diff --git a/.drone.yml b/.drone.yml index 8cf43aa2..93fad07b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,6 +10,7 @@ steps: commands: - make vet - make test + - make fmt-check when: event: - push diff --git a/integrations/session_test.go b/integrations/session_test.go index af8b0375..c3ef0513 100644 --- a/integrations/session_test.go +++ b/integrations/session_test.go @@ -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) -} \ No newline at end of file +} diff --git a/internal/utils/strings.go b/internal/utils/strings.go index b5dc37b7..72466705 100644 --- a/internal/utils/strings.go +++ b/internal/utils/strings.go @@ -27,4 +27,3 @@ func SplitNNoCase(s, sep string, n int) []string { } return strings.SplitN(s, s[idx:idx+len(sep)], n) } - diff --git a/session.go b/session.go index 48b3779e..b6ab3eb5 100644 --- a/session.go +++ b/session.go @@ -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 }