diff options
author | Ethel Morgan <eth@ethulhu.co.uk> | 2020-06-24 12:25:50 +0100 |
---|---|---|
committer | Ethel Morgan <eth@ethulhu.co.uk> | 2020-06-24 12:25:50 +0100 |
commit | ee95cf1f3a8b8d38e551261479fc66a113ebeedb (patch) | |
tree | 06814f780b3f05be700171b8b5870e9b592a9bde /cmd/catbus-actuator-wakeonlan/main.go | |
parent | ceacceca1d01956a2a8576cc6fee6327808a8ef2 (diff) |
update catbus library
Diffstat (limited to '')
-rw-r--r-- | cmd/catbus-actuator-wakeonlan/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) |