From cf0a8d3049baa2ab46290314739187c232055dc6 Mon Sep 17 00:00:00 2001 From: Drew Bednar Date: Sun, 22 Sep 2024 15:14:20 -0400 Subject: [PATCH] Fix fmt call --- cmd/publisher/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/publisher/main.go b/cmd/publisher/main.go index 6453b15..995a30e 100644 --- a/cmd/publisher/main.go +++ b/cmd/publisher/main.go @@ -22,7 +22,7 @@ func main() { fmt.Printf("Received Message: %s from topic %s\n", msg.Payload(), msg.Topic()) }) options.OnConnect = func(c mqtt.Client) { fmt.Println("Connected to Broker") } - options.OnConnectionLost = func(c mqtt.Client, err error) { fmt.Println("Connection Lost: %v", err) } + options.OnConnectionLost = func(c mqtt.Client, err error) { fmt.Printf("Connection Lost: %v\n", err) } client := mqtt.NewClient(options) if token := client.Connect(); token.Wait() && token.Error() != nil { panic(token.Error())