gofmt
This commit is contained in:
parent
6837a07beb
commit
1fa6e82ac1
2
main.go
2
main.go
@ -160,7 +160,7 @@ func (app *App) onSetStateMessage(ctx context.Context, msg mqttpaho.Message) {
|
|||||||
Str("action", "onSetStateMessage").
|
Str("action", "onSetStateMessage").
|
||||||
Str("device", device_name).
|
Str("device", device_name).
|
||||||
Logger()
|
Logger()
|
||||||
ctx = logger.WithContext(ctx)
|
// ctx = logger.WithContext(ctx)
|
||||||
|
|
||||||
var state device.DeviceState
|
var state device.DeviceState
|
||||||
if err := json.Unmarshal(msg.Payload(), &state); err != nil {
|
if err := json.Unmarshal(msg.Payload(), &state); err != nil {
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
package mqtt
|
package mqtt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/uuid"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -2,6 +2,7 @@ package mqtt
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
mqtt "github.com/eclipse/paho.mqtt.golang"
|
mqtt "github.com/eclipse/paho.mqtt.golang"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user