aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthel Morgan <eth@ethulhu.co.uk>2020-06-24 23:29:18 +0100
committerEthel Morgan <eth@ethulhu.co.uk>2020-06-24 23:29:18 +0100
commit7fb447f8e846fd54ea2bbbf5b383102980d566d7 (patch)
treed3e4801f6b14ab6c0ce4e2349b80ce47b236fa0c
parentee95cf1f3a8b8d38e551261479fc66a113ebeedb (diff)
update catbus library version to v0.0.3
-rw-r--r--cmd/catbus-actuator-wakeonlan/main.go10
-rw-r--r--default.nix2
-rw-r--r--go.mod2
-rw-r--r--go.sum2
4 files changed, 9 insertions, 7 deletions
diff --git a/cmd/catbus-actuator-wakeonlan/main.go b/cmd/catbus-actuator-wakeonlan/main.go
index 508d1cf..22157e9 100644
--- a/cmd/catbus-actuator-wakeonlan/main.go
+++ b/cmd/catbus-actuator-wakeonlan/main.go
@@ -37,22 +37,22 @@ func main() {
log.AddField("broker-uri", config.BrokerURI)
catbusOptions := catbus.ClientOptions{
- DisconnectHandler: func(_ *catbus.Client, err error) {
+ DisconnectHandler: func(_ catbus.Client, err error) {
log := log
if err != nil {
log = log.WithError(err)
}
log.Error("disconnected from MQTT broker")
},
- ConnectHandler: func(client *catbus.Client) {
+ ConnectHandler: func(client catbus.Client) {
log.Info("connected to MQTT broker")
for topic := range config.MACsByTopic {
- err := client.Subscribe(topic, func(_ *catbus.Client, msg catbus.Message) {
- if msg.Payload() != "on" {
+ err := client.Subscribe(topic, func(_ catbus.Client, msg catbus.Message) {
+ if msg.Payload != "on" {
return
}
- mac, ok := config.MACsByTopic[msg.Topic()]
+ mac, ok := config.MACsByTopic[msg.Topic]
if !ok {
return
}
diff --git a/default.nix b/default.nix
index 840aab3..97a3da6 100644
--- a/default.nix
+++ b/default.nix
@@ -10,7 +10,7 @@ buildGoModule rec {
version = "latest";
goPackagePath = "go.eth.moe/catbus-wakeonlan";
- modSha256 = "0kll39ran2bl7w0l6a7866ka733cxyigx7gr3q4lfx2gxr6jqz8y";
+ modSha256 = "1vv9g9g55zpq68snpk3m6ashzwipy5w3xng06l7i5pbjw1n27m0g";
src = ./.;
diff --git a/go.mod b/go.mod
index d33884c..ad9647a 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.2
+ go.eth.moe/catbus v0.0.3
go.eth.moe/logger v0.0.1
)
diff --git a/go.sum b/go.sum
index 276f6f5..563bf35 100644
--- a/go.sum
+++ b/go.sum
@@ -14,6 +14,8 @@ 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/catbus v0.0.3 h1:foZX7+kYuL3x7f1gX1qPeA3Y66D8I2Vs1RNfAkFXQmk=
+go.eth.moe/catbus v0.0.3/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=