]> git.giacomolli.uk - onechat/commit
Name and order the Telegram bot code
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Sat, 7 Nov 2026 16:20:24 +0000 (13:20 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Sat, 7 Nov 2026 16:30:22 +0000 (13:30 -0300)
commit09cde69fdffe2721434392036f98dc241177f5a1
treedbcd5f4b014d773ed7664bb750e053ba51468319
parentfb242538c1b012b0faf3cc4045a9b1c370f1ef42
Name and order the Telegram bot code

Every package-level name of the Telegram bot starts with telegram, and
its files start with the same name: the Bot API client is in
telegram_api.go and the Markdown conversion in telegram_markdown.go. So
the names of the bot do not read as names of the model client or of the
login, which also have a client, an API, and a poll. Type names start
with a capital letter, so that a variable can have the name of its type.

The declarations of the Telegram files follow the order of the go-code
skill: entry points, then each type with its methods, then the utility
functions, each group in the order of first use. The behavior does not
change.

Issue: 947bddb
daemon.go
daemon_test.go
telegram.go
telegram_api.go [moved from botapi.go with 51% similarity]
telegram_api_test.go [moved from botapi_test.go with 68% similarity]
telegram_markdown.go [moved from markdown.go with 52% similarity]
telegram_markdown_test.go [moved from markdown_test.go with 89% similarity]
telegram_test.go