From ee95cf1f3a8b8d38e551261479fc66a113ebeedb Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Wed, 24 Jun 2020 12:25:50 +0100 Subject: update catbus library --- cmd/catbus-actuator-wakeonlan/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/catbus-actuator-wakeonlan/main.go b/cmd/catbus-actuator-wakeonlan/main.go index af826ad..508d1cf 100644 --- a/cmd/catbus-actuator-wakeonlan/main.go +++ b/cmd/catbus-actuator-wakeonlan/main.go @@ -49,7 +49,7 @@ func main() { for topic := range config.MACsByTopic { err := client.Subscribe(topic, func(_ *catbus.Client, msg catbus.Message) { - if string(msg.Payload()) != "on" { + if msg.Payload() != "on" { return } mac, ok := config.MACsByTopic[msg.Topic()] @@ -74,9 +74,9 @@ func main() { }, } - catbusOptions.DefaultPayloadByTopic = map[string][]byte{} + catbusOptions.DefaultPayloadByTopic = map[string]string{} for topic := range config.MACsByTopic { - catbusOptions.DefaultPayloadByTopic[topic] = []byte("off") + catbusOptions.DefaultPayloadByTopic[topic] = "off" } catbus := catbus.NewClient(config.BrokerURI, catbusOptions) -- cgit v1.2.3