Fix linter issues

This commit is contained in:
Till Faelligen 2022-03-26 19:10:25 +01:00
parent a99a63aa68
commit 926f87ef7a
2 changed files with 2 additions and 2 deletions

View file

@ -106,7 +106,7 @@ func (t *OutputEDUConsumer) onSendToDeviceEvent(ctx context.Context, msg *nats.M
} }
// Extract the send-to-device event from msg. // Extract the send-to-device event from msg.
var ote syncTypes.OutputSendToDeviceEvent var ote syncTypes.OutputSendToDeviceEvent
if err := json.Unmarshal(msg.Data, &ote); err != nil { if err = json.Unmarshal(msg.Data, &ote); err != nil {
log.WithError(err).Errorf("output log: message parse failed (expected send-to-device)") log.WithError(err).Errorf("output log: message parse failed (expected send-to-device)")
return true return true
} }

View file

@ -85,7 +85,7 @@ func (s *OutputSendToDeviceEventConsumer) onMessage(ctx context.Context, msg *na
} }
var output types.OutputSendToDeviceEvent var output types.OutputSendToDeviceEvent
if err := json.Unmarshal(msg.Data, &output); err != nil { if err = json.Unmarshal(msg.Data, &output); err != nil {
// If the message was invalid, log it and move on to the next message in the stream // If the message was invalid, log it and move on to the next message in the stream
log.WithError(err).Errorf("output log: message parse failure") log.WithError(err).Errorf("output log: message parse failure")
sentry.CaptureException(err) sentry.CaptureException(err)