From 8b5bb8c0b15655f9cc75c96d033b0a801b108c93 Mon Sep 17 00:00:00 2001 From: Moshe Immermam Date: Tue, 2 Jan 2024 08:13:22 +0200 Subject: [PATCH] chore: fix nil pointer --- context/context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context/context.go b/context/context.go index 03a1941..7a288c6 100644 --- a/context/context.go +++ b/context/context.go @@ -136,11 +136,11 @@ func (c Context) WithTimeout(timeout time.Duration) (Context, gocontext.CancelFu } func (c Context) IsDebug() bool { - return (c.debug != nil && *c.debug) || c.isDebugFn(c) + return (c.debug != nil && *c.debug) || (c.isDebugFn != nil && c.isDebugFn(c)) } func (c Context) IsTrace() bool { - return (c.trace != nil && *c.trace) || c.isTraceFn(c) + return (c.trace != nil && *c.trace) || (c.isTraceFn != nil && c.isTraceFn(c)) } func (c Context) Debugf(format string, args ...interface{}) {