Commit Graph

5 Commits

Author SHA1 Message Date
Kyle Carberry b0fe9bcdd1
chore: Upgrade to Go 1.19 (#3617)
This is required as part of #3505.
2022-08-21 22:32:53 +00:00
Jon Ayers 62e685669f
feat: add verbose error messaging (#3053) 2022-07-20 15:17:51 -05:00
Mathias Fredriksson 749694b7de
fix: Standardize and wrap example descriptions at 80 chars (#2894) 2022-07-11 19:08:09 +03:00
Steven Masley e2b2580196
chore: `version` sub command remove `--version` and `-v` flag (#2090)
* test: Add unit test for version cmd
2022-06-06 17:38:51 -05:00
Joe Previte 6dae48a1a8
fix: show --help message for CLI errors, add tests for delete (#1403)
* feat(cli): add test for delete

This adds a new test for the `delete` command to ensure it works as
expected when provided the correct args.

* fix(cli): use ExecuteC() to match Cobra

This modifies the `cli.Root().Execute()` to `cli.Root).ExecuteC()` to
match the default behavior of Cobra. We do this so errors will always
print the "run --help" line.

* feat(cli): add WithoutParameters test for delete

This adds a new test to the `delete_test.go` suite to ensure the correct
behavior occurs when `delete` is called without an argument.

* fixup! feat(cli): add WithoutParameters test for delete

* refactor(cli): show --help error message on main

This adds an error message which shows when there is an error with any
commands called to improve the UX.

* fixup! refactor(cli): show --help error message on main

* refactor(cli): handle err with FormatCobraError

This adds a new helper function called `FormatCobraError` to `root.go`
so that we can colorize and add "--help" message to cobra command errors
like calling `delete`.

* refactor(cli): add root_test.go, move delete test
2022-05-19 22:35:59 +00:00