Skip to content

Conversation

caarlos0
Copy link
Member

since we now use cobra and can RunE, we can improve the error handling in main.go too.

Done just that :)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 added the enhancement New feature or request label Aug 30, 2023
@caarlos0 caarlos0 merged commit 82a634e into cobraaa Aug 30, 2023
@caarlos0 caarlos0 deleted the errors branch August 30, 2023 18:39
caarlos0 added a commit that referenced this pull request Sep 1, 2023
* refactor: use cobra for flags

- Use Cobra
- Clean up
- Refactor

* fix: db path

* feat: completions

* chore: cleanup

* chore: cleanup

* fix: tests

* test: db.Completions

* fix: improvements

* fix: config

* test: fix broken test

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: env, gitignore

* fix: no need to wrap in an error

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: mods with no args

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: --list should print list to stdout (#113)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: improve error handling (#114)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: styles & stderr

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: version

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: remove unused examples

* fix: hide completion and help commands

* fix: error handling

- Fix modsError
- Error when continuing without a prompt

* fix: mark flags as mutually exclusive

* fix: create cache directory

* fix: improve completions

* fix: improve completions

* fix: use errors.As

* fix: improve styles

* fix: improve config creation and its error handling

* fix: mkdir cache

* fix: ensure error's reasons ends with .

* perf: indices

* test: fix broken test, add no prompt continue test

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: fmt queries

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant