Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Add multierror #86

Merged
merged 1 commit into from
May 14, 2020
Merged

Add multierror #86

merged 1 commit into from
May 14, 2020

Conversation

rumpl
Copy link
Member

@rumpl rumpl commented May 13, 2020

docker/api/multierror wraps go-multierror from hashicorp with our default error formatting.

Sample output:

❯ ./bin/docker --context moby context rm test one two
Error: context "test": not found
Error: context "one": not found
Error: context "two": not found

❯ ./bin/docker --context moby rm test one two        
Error: container "test": not found
Error: container "one": not found
Error: container "two": not found

@rumpl rumpl marked this pull request as draft May 13, 2020 14:11
@rumpl rumpl force-pushed the feat-multierror branch 2 times, most recently from b3e8d22 to 25bf749 Compare May 13, 2020 16:30
@rumpl rumpl marked this pull request as ready for review May 13, 2020 16:31
docker/api/multierror wraps go-multierror from hashicorp with
our default error formating
@rumpl
Copy link
Member Author

rumpl commented May 13, 2020

Build is passing

@rumpl
Copy link
Member Author

rumpl commented May 14, 2020

There's a lot of wrapping here but it's needed... There is a PR opened that could help this but it's still not merged and it's from 2016, I commented on it, we'll see if hashicorp is willing in merging a PR that would make it possible to define a global formatting function.

Copy link
Member

@chris-crone chris-crone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I really like this approach for the CLI errors. We should get @justincormack to review this for UX.

@rumpl rumpl merged commit 6b435cf into docker:master May 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants