From df53f4411ac5f7f7b41d9ddbaa060a0ed014a30a Mon Sep 17 00:00:00 2001 From: I Putu Eddy Irawan Date: Tue, 3 Mar 2026 09:11:24 +0700 Subject: [PATCH] fix: format long lines in telegram_test.go to satisfy golines linter Break function signatures and assert calls that exceed the 120-char golines limit onto multiple lines. Co-Authored-By: Claude Opus 4.6 --- pkg/channels/telegram/telegram_test.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkg/channels/telegram/telegram_test.go b/pkg/channels/telegram/telegram_test.go index 9d26bdd1a..ebbc36095 100644 --- a/pkg/channels/telegram/telegram_test.go +++ b/pkg/channels/telegram/telegram_test.go @@ -41,7 +41,10 @@ func (s *stubConstructor) JSONRequest(parameters any) (*ta.RequestData, error) { return &ta.RequestData{}, nil } -func (s *stubConstructor) MultipartRequest(parameters map[string]string, files map[string]ta.NamedReader) (*ta.RequestData, error) { +func (s *stubConstructor) MultipartRequest( + parameters map[string]string, + files map[string]ta.NamedReader, +) (*ta.RequestData, error) { return &ta.RequestData{}, nil } @@ -211,7 +214,10 @@ func TestSend_MarkdownShortButHTMLLong_MultipleCalls(t *testing.T) { assert.LessOrEqual(t, len([]rune(markdownContent)), 4200, "markdown content should be near Telegram limit") htmlExpanded := markdownToTelegramHTML(markdownContent) - assert.Greater(t, len([]rune(htmlExpanded)), 4096, "HTML expansion must exceed Telegram limit for this test to be meaningful") + assert.Greater( + t, len([]rune(htmlExpanded)), 4096, + "HTML expansion must exceed Telegram limit for this test to be meaningful", + ) err := ch.Send(context.Background(), bus.OutboundMessage{ ChatID: "12345", @@ -219,7 +225,10 @@ func TestSend_MarkdownShortButHTMLLong_MultipleCalls(t *testing.T) { }) assert.NoError(t, err) - assert.Greater(t, len(caller.calls), 1, "markdown-short but HTML-long message should be split into multiple SendMessage calls") + assert.Greater( + t, len(caller.calls), 1, + "markdown-short but HTML-long message should be split into multiple SendMessage calls", + ) } func TestSend_NotRunning(t *testing.T) {