Skip to content

Deferred command descriptions #72

@Anaminus

Description

@Anaminus

Cobra, as well as most flag packages, requires specifying the description of a command as a string. Because rbxmk descriptions are dynamic, this means that a lot of work is put into initializing descriptions even if they aren't used.

rbxmk's fork of Cobra should be fitted with an option to defer its descriptions. This can be implemented as the following: When getting the description of a command, if the description field is empty, check the description resolver field, which is a function that returns a string. If specified, call it, and set the description field to the result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions