From 952221d3b9b465011b33ae8e7d881b1cf7772189 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 20 Mar 2022 14:13:28 +0100 Subject: [PATCH] Fix linting (whatsapp) --- bridge/whatsapp/handlers.go | 2 ++ bridge/whatsapp/helpers.go | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go index 1be9b5e3..8f9fef15 100644 --- a/bridge/whatsapp/handlers.go +++ b/bridge/whatsapp/handlers.go @@ -1,3 +1,4 @@ +// nolint:goconst package bwhatsapp import ( @@ -134,6 +135,7 @@ func (b *Bwhatsapp) HandleTextMessage(message whatsapp.TextMessage) { } // HandleImageMessage sent from WhatsApp, relay it to the brige +// nolint:funlen func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) { if message.Info.FromMe || message.Info.Timestamp < b.startedAt { return diff --git a/bridge/whatsapp/helpers.go b/bridge/whatsapp/helpers.go index e424387d..9d39d368 100644 --- a/bridge/whatsapp/helpers.go +++ b/bridge/whatsapp/helpers.go @@ -111,8 +111,7 @@ func (b *Bwhatsapp) getSenderName(senderJid string) string { } // try to reload this contact - _, err := b.conn.Contacts() - if err != nil { + if _, err := b.conn.Contacts(); err != nil { b.Log.Errorf("error on update of contacts: %v", err) }