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 <noreply@anthropic.com>
This commit is contained in:
parent
33109a1676
commit
df53f4411a
1 changed files with 12 additions and 3 deletions
|
|
@ -41,7 +41,10 @@ func (s *stubConstructor) JSONRequest(parameters any) (*ta.RequestData, error) {
|
||||||
return &ta.RequestData{}, nil
|
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
|
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")
|
assert.LessOrEqual(t, len([]rune(markdownContent)), 4200, "markdown content should be near Telegram limit")
|
||||||
|
|
||||||
htmlExpanded := markdownToTelegramHTML(markdownContent)
|
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{
|
err := ch.Send(context.Background(), bus.OutboundMessage{
|
||||||
ChatID: "12345",
|
ChatID: "12345",
|
||||||
|
|
@ -219,7 +225,10 @@ func TestSend_MarkdownShortButHTMLLong_MultipleCalls(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
assert.NoError(t, err)
|
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) {
|
func TestSend_NotRunning(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue