Skip to content

client: minor cleanups, refactors - #53509

Open
thaJeztah wants to merge 5 commits into
moby:masterfrom
thaJeztah:client_refactor
Open

client: minor cleanups, refactors#53509
thaJeztah wants to merge 5 commits into
moby:masterfrom
thaJeztah:client_refactor

Conversation

@thaJeztah

@thaJeztah thaJeztah commented Aug 29, 2026

Copy link
Copy Markdown
Member

client: minor cleanups, refactors

client: add valueOrZero utility

This allows more easily constructing a struct.

client: simplify normalizeCapabilities

client: add normalizeHostConfig utility

client: request: use consistent order or arguments

Make body the last argument, so that requests can be inlined on call-sites.

client: use slice type for plugin privileges internally

Use []plugin.Privilege for internal plugin install and upgrade helpers instead
of the exported plugin.Privileges type.

The latter primarily exists to implement sort.Interface, which these callers
do not use. Keep plugin.Privileges at the public API boundary, where it remains
part of AcceptPermissionsFunc's signature.

Release notes (optional)

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

This allows more easily constructing a struct.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 module/client labels Aug 29, 2026
@thaJeztah thaJeztah modified the milestones: 29.9.0, 29.8.0 Aug 29, 2026
Make `body` the last argument, so that requests can be inlined on call-sites.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use []plugin.Privilege for internal plugin install and upgrade helpers instead
of the exported plugin.Privileges type.

The latter primarily exists to implement sort.Interface, which these callers
do not use. Keep plugin.Privileges at the public API boundary, where it remains
part of AcceptPermissionsFunc's signature.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 module/client status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant