aboutsummaryrefslogtreecommitdiff
path: root/api/telegram/bot/command_test.go
AgeCommit message (Collapse)Author
2026-01-03all: use SPDX license header formatShulhan
2024-03-02all: move the repository to "git.sr.ht/~shulhan/pakakeh.go"Shulhan
There are several reasons that why we move from github.com. First, related to the name of package. We accidentally name the package with "share" a common word in English that does not reflect the content of repository. By moving to other repository, we can rename it to better and unique name, in this "pakakeh.go". Pakakeh is Minang word for tools, and ".go" suffix indicate that the repository related to Go programming language. Second, supporting open source. The new repository is hosted under sourcehut.org, the founder is known to support open source, and all their services are licensed under AGPL, unlike GitHub that are closed sources. Third, regarding GitHub CoPilot. The GitHub Terms of Service [1], allow any public content that are hosted there granted them to parse the content. On one side, GitHub helps and flourish the open source, but on another side have an issues regarding scraping the copyleft license [2]. [1]: https://docs.github.com/en/site-policy/github-terms/github-terms-of-service#4-license-grant-to-us [2]: https://githubcopilotinvestigation.com
2024-02-15all: set unused parameter to "_"Shulhan
2023-09-11api/telegram/bot: realign struct for better size allocationShulhan
The realignment reduce the size of the following struct (in bytes), * Audio: from 112 to 104 (-8) * Bot: from 88 to 72 (-16) * Chat: from 160 to 144 (-16) * Command: from 40 to 32 (-8) * struct in TestCommand_validate: from 72 to 64 (-8) * Contact: from 64 to 56 (-8) * Document: from 80 to 64 (-16) * EncryptedPassportElement: from 144 to 136 (-8) * Game: from 104 to 88 (-16) * InlineKeyboardButton: from 96 to 88 (-8) * InlineQuery: from 64 to 56 (-8) * Message: from 544 to 488 (-56) * MessageEntity: from 64 to 48 (-16) * MessageForward: from 56 to 40 (-16) * messageRequest: from 80 to 56 (-24) * struct in TestMessage_parseCommandArgs: from 576 to 520 (-36) * Options: from 32 to 24 (-8) * OrderInfo: from 56 to 48 (-8) * PassportData: from 64 to 56 (-8) * PreCheckoutQuery: from 88 to 72 (-16) * response: from 56 to 32 (-24) * ShippingQuery: from 48 to 40 (-8) * Sticker: from 136 to 112 (-24) * SuccessfulPayment: from 88 to 80 (-8) * Update: from 96 to 88 (-8) * User: from 64 to 56 (-8) * Venue: from 72 to 56 (-16) * Webhook: from 96 to 72 (-16) * WebhookInfo: from 64 to 40 (-24)
2021-03-14all: refactoring the test.Assert and test.AssertBench signatureShulhan
Previously, the test.Assert and test.AssertBench functions has the boolean parameter to print the stack trace of test in case its not equal. Since this parameter is not mandatory and its usually always set to "true", we remove them from function signature to simplify the call to Assert and AssertBench.
2020-06-10all: update email addressShulhan
2020-04-11api/telegram/bot: Go package for Telegram API BotShulhan