From: Anderson A. Giacomolli Date: Sat, 7 Nov 2026 17:36:56 +0000 (-0300) Subject: Fix two comments of the Telegram API and the view X-Git-Url: http://git.giacomolli.uk/onechat/commitdiff_plain/fbee1a3e74297e1f73b3fc99913861b80c96cf87 Fix two comments of the Telegram API and the view The doc comment of TelegramAPI names its sendTimeout field, which limits each send call, and not SendTimeout, which is no name in the code. The doc comment of the test helper viewPush describes what the push does to the rollback state list, and it does not name a file of the reference design. Issue: 947bddb --- diff --git a/telegram_api.go b/telegram_api.go index 558d006..bb4ee2c 100644 --- a/telegram_api.go +++ b/telegram_api.go @@ -74,9 +74,9 @@ func telegramRejected(err error) bool { } // TelegramAPI calls the Telegram Bot API. The bot token is a part of each URL, -// so no error of TelegramAPI holds a URL, a net/http error, or the token. -// SendTimeout limits each sendMessage, sendRichMessage, and sendChatAction -// call. +// so no error of TelegramAPI holds a URL, a net/http error, or the token. Its +// sendTimeout field limits each sendMessage, sendRichMessage, and +// sendChatAction call. type TelegramAPI struct { base string token string diff --git a/view_test.go b/view_test.go index 39c8e11..56abdd6 100644 --- a/view_test.go +++ b/view_test.go @@ -197,7 +197,11 @@ func (p ViewPartTree) Node(level, index int) (Node, bool, error) { return treeTestNode(level, index, text), true, nil } -// viewPush is the push of rollback_state_list.js. +// viewPush adds state to the newest end of states and returns the new list. An +// empty list gets one entry. When the newest entry is not kept, it becomes kept +// with its own state, and state is dropped. When it is kept, state becomes a +// new newest entry, and the state of the old newest entry goes to the older +// entries by the same push. func viewPush(state int, states *ViewPushEntry) *ViewPushEntry { if states == nil { return &ViewPushEntry{