From ba71f76530683937d92d6053e7dd7f77786d11ac Mon Sep 17 00:00:00 2001 From: ClasWen Date: Thu, 15 Feb 2024 22:26:52 +0800 Subject: [PATCH] fix import --- repo/db.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/repo/db.go b/repo/db.go index ec2186b..dc5fa93 100644 --- a/repo/db.go +++ b/repo/db.go @@ -3,10 +3,8 @@ package repo import ( "context" "database/sql" - "log" "os" "time" - "unsafe" "github.com/go-sql-driver/mysql" "github.com/nbtca/saturday/util" @@ -30,9 +28,9 @@ func (h *Hooks) Before(ctx context.Context, query string, args ...interface{}) ( func (h *Hooks) After(ctx context.Context, query string, args ...interface{}) (context.Context, error) { begin := ctx.Value("begin").(time.Time) util.Logger.WithFields(logrus.Fields{ - "query": query, - "args": args, - "elapsed": time.Since(begin), + "query": query, + "args": args, + "elapsed": time.Since(begin), }).Debug("SQL executed") return ctx, nil }