From 722552a1c3a43746f6797dcb59e0760e589e729d Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 1 Jun 2023 20:51:24 -0400 Subject: [PATCH] foolish --- topic_publisher.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/topic_publisher.go b/topic_publisher.go index c0456f3..1bc22ec 100644 --- a/topic_publisher.go +++ b/topic_publisher.go @@ -20,7 +20,7 @@ var ( // TopicPublisher creates messages for topics type TopicPublisher struct { - logger slog.Logger + logger *slog.Logger server *url.URL httpClient *http.Client @@ -30,10 +30,10 @@ type TopicPublisher struct { // and uses the supplied HTTP client to resolve the request. Uses the golang // slog package to log to; if you want to skip all logs supply slog.Logger{} // with a blank handler, and the publisher will do a no-op -func NewTopicPublisher(slogger slog.Logger, server *url.URL, httpClient *http.Client) (*TopicPublisher, error) { +func NewTopicPublisher(slogger *slog.Logger, server *url.URL, httpClient *http.Client) (*TopicPublisher, error) { if slogger.Handler() == nil { // if no logger is passed, ignore absolutely everything - slogger = slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: math.MaxInt})) + slogger = slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.Level(math.MaxInt)})) } if server == nil {