Skip to content

Improve and clarify doc comments for public API #229

@steindvart

Description

@steindvart

Problem

Many documentation comments in the go-telegram/bot library lack important details. For example:

  • Some comments do not clarify how the function or entity works. For example, WithMiddlewares allows to set middlewares for each incoming request does not specify the order of middleware execution. A more informative comment would be:
    // Set middlewares for each incoming request (update).
    // Middleware functions are called in the order in which they are added.
  • Comments such as SetWebhook https://core.telegram.org/bots/api#setwebhook should be changed to See Telegram API: https://core.telegram.org/bots/api#setwebhook for clarity and consistency.
  • etc.

Proposal

  • Add specific details where needed, such as the order of function calls or links to official documentation.
  • Use concise language and keep the main point clear.

Arguments

  • Clear and informative doc comments help developers use the library correctly and efficiently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions