Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizable error message prefix #2023

Merged
merged 9 commits into from
Sep 8, 2023
Merged

Customizable error message prefix #2023

merged 9 commits into from
Sep 8, 2023

Commits on Aug 31, 2023

  1. [add] The error message prefix

    The user can change it by specifying `errPrefix` by `SetErrPrefix`.
    5ouma authored Aug 31, 2023
    Configuration menu
    Copy the full SHA
    48dabba View commit details
    Browse the repository at this point in the history
  2. [update] Use the prefix, Error: by default

    If there's no specifying, return the prefix used before.
    5ouma committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    ff58b53 View commit details
    Browse the repository at this point in the history
  3. [update] Doc to use errPrefix

    Description to change it and what it is.
    5ouma committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    a76559e View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2023

  1. [update] Test for SetErrPrefix()

    If it doesn't output any errors, fails the test.
    5ouma committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    da3c9ee View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. [update] Several changes that were reviewed

    Fix some grammar misses and use `cmd` for subcommands.
    5ouma committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    fabc43c View commit details
    Browse the repository at this point in the history
  2. [update] More tests that were requested

    Root error prefix called from subcommand, and different error prefixes in root and subcommand.
    #2023 (comment)
    5ouma committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    ed4583e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2b602c View commit details
    Browse the repository at this point in the history
  4. [fix] Forgot to change c.ErrPrefix() to cmd.ErrPrefix()

    To use an error prefix of subcommand as well.
    5ouma authored Sep 8, 2023
    Configuration menu
    Copy the full SHA
    5dec565 View commit details
    Browse the repository at this point in the history
  5. [revert] Crude change of c.ErrPrefix()

    Since `cmd` is `nil` or same as `c`.
    5ouma committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    c24c3fd View commit details
    Browse the repository at this point in the history