From dfa59785373d14e1defbe848ee945e8ac7941609 Mon Sep 17 00:00:00 2001 From: takashabe Date: Tue, 14 Nov 2023 18:11:32 +0900 Subject: [PATCH] Fix nil check in begin from h.Open to h.Begin --- hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks.go b/hooks.go index d0d886a..c4d8523 100644 --- a/hooks.go +++ b/hooks.go @@ -509,7 +509,7 @@ func (h *HooksContext) preBegin(c context.Context, conn *Conn) (interface{}, err } func (h *HooksContext) begin(c context.Context, ctx interface{}, conn *Conn) error { - if h == nil || h.Open == nil { + if h == nil || h.Begin == nil { return nil } return h.Begin(c, ctx, conn)