aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/catbus-actuator-wakeonlan/main.go6
-rw-r--r--go.mod2
-rw-r--r--go.sum2
3 files changed, 6 insertions, 4 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)
diff --git a/go.mod b/go.mod
index 6268b21..d33884c 100644
--- a/go.mod
+++ b/go.mod
@@ -7,6 +7,6 @@ module go.eth.moe/catbus-wakeonlan
go 1.14
require (
- go.eth.moe/catbus v0.0.1
+ go.eth.moe/catbus v0.0.2
go.eth.moe/logger v0.0.1
)
diff --git a/go.sum b/go.sum
index 71e05e8..276f6f5 100644
--- a/go.sum
+++ b/go.sum
@@ -12,6 +12,8 @@ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
go.eth.moe/catbus v0.0.1 h1:hODPBqJQpbAJ0+n6iBAQfuoAKCvnOFmwkEGpKKvnB8Y=
go.eth.moe/catbus v0.0.1/go.mod h1:bVYTqNPbc4QCACFDMTKFv/5cFZWYDKPSamTP0/lbvW0=
+go.eth.moe/catbus v0.0.2 h1:gTbmKzhTTs4O+cuq6Wlmj8KhRQuybe/qtdD88SwlzmI=
+go.eth.moe/catbus v0.0.2/go.mod h1:bVYTqNPbc4QCACFDMTKFv/5cFZWYDKPSamTP0/lbvW0=
go.eth.moe/logger v0.0.1 h1:ncY0iuVIljShMQtwy+77DvoHDlu6zVZ+7XIT7jyprrY=
go.eth.moe/logger v0.0.1/go.mod h1:G20TP3ON2S95olTep+qsBSoTfouZeKPukk3Ow42q5OQ=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=