8000 cli/command: use errors.Join instead of our own implementation by thaJeztah · Pull Request #5791 · docker/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cli/command: use errors.Join instead of our own implementation #5791

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

Merged
merged 14 commits into from
Feb 4, 2025

Conversation

thaJeztah
Copy link
Member

cli/command: use errors.Join instead of our own implementation

cli/command/config: RunConfigRemove: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/container: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/context: use errors.Join

Use stdlib multi-errors instead of creating our own; also
touch-up one error and some minor cleanups.

cli/command/image: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/inspect: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/manifest: pass manifest-store and handle context

  • pass through the manifest-store, instead of the CLI as a whole
  • handle context cancellation
  • rename runRm to runRemove to align with other commands

cli/command/manifest: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/node: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/secret: use errors.Join

  • Use stdlib multi-errors instead of creating our own
  • use apiClient instead of client for the API client to
    prevent shadowing imports.
  • use dockerCLI with Go's standard camelCase casing.
  • rename runSecretRemove to runRemove to align with other commands

cli/command/service: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/stack/swarm: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/volume: use errors.Join

Use stdlib multi-errors instead of creating our own

cli/command/service: runRollback: remove intermediate vars

cli/command/service: runScale: use errors.Join, and cleanup

  • Use stdlib multi-errors instead of creating our own
  • use apiClient instead of client for the API client to
    prevent shadowing imports.
  • use dockerCLI with Go's standard camelCase casing.
  • rewrite runServiceScale to return warnings, instead of printing them

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own; also
touch-up one error and some minor cleanups.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- pass through the manifest-store, instead of the CLI as a whole
- handle context cancellation
- rename `runRm` to `runRemove` to align with other commands

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Use stdlib multi-errors instead of creating our own
- use apiClient instead of client for the API client to
  prevent shadowing imports.
- use dockerCLI with Go's standard camelCase casing.
- rename runSecretRemove to runRemove to align with other commands

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Feb 3, 2025
@thaJeztah thaJeztah added this to the 28.0.0 milestone Feb 3, 2025
@thaJeztah thaJeztah self-assigned this Feb 3, 2025
@thaJeztah thaJeztah requested review from silvin-lubecki and a team as code owners February 3, 2025 18:48
@codecov-commenter
Copy link
codecov-commenter commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 55.74713% with 77 lines in your changes missing coverage. Please review.

Project coverage is 59.41%. Comparing base (ce30966) to head (81da375).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5791      +/-   ##
==========================================
- Coverage   59.44%   59.41%   -0.03%     
==========================================
  Files         347      347              
  Lines       29394    29346      -48     
==========================================
- Hits        17472    17436      -36     
+ Misses      10950    10937      -13     
- Partials      972      973       +1     

Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use stdlib multi-errors instead of creating our own

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Use stdlib multi-errors instead of creating our own
- use apiClient instead of client for the API client to
  prevent shadowing imports.
- use dockerCLI with Go's standard camelCase casing.
- rewrite runServiceScale to return warnings, instead of printing them

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Member
@Benehiko Benehiko left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 7c3fa81 into docker:master Feb 4, 2025
89 checks passed
@thaJeztah thaJeztah deleted the multi_errors branch February 4, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactor PR's that refactor, or clean-up code status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0