Skip to content

Commit

Permalink
ref: have NewGoKitHandler() return slog.Handler interface type
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tjhop committed Nov 20, 2024
1 parent b3ba86d commit b8eba7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b8eba7d

Please sign in to comment.