From b8eba7d306ab8eacae185ed403ffef3581c89f6a Mon Sep 17 00:00:00 2001 From: TJ Hoplock Date: Wed, 20 Nov 2024 13:23:18 -0500 Subject: [PATCH] ref: have NewGoKitHandler() return slog.Handler interface type We still return the concrete implementation in the actual return call, but the signature should ensure better compatibility with slog. Signed-off-by: TJ Hoplock --- handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler.go b/handler.go index c8e03d5..200f2f2 100644 --- a/handler.go +++ b/handler.go @@ -25,7 +25,7 @@ type GoKitHandler struct { // logger. Calls to the slog logger are chained to the handler's internal // go-kit logger. If provided a level, it will be used to filter log events in // the handler's Enabled() method. -func NewGoKitHandler(logger log.Logger, level slog.Leveler) GoKitHandler { +func NewGoKitHandler(logger log.Logger, level slog.Leveler) slog.Handler { if logger == nil { logger = defaultGoKitLogger }