Skip to content

formatting: only strip "/" prefixes#6874

Open
thaJeztah wants to merge 2 commits intodocker:masterfrom
thaJeztah:future_proof_prefix
Open

formatting: only strip "/" prefixes#6874
thaJeztah wants to merge 2 commits intodocker:masterfrom
thaJeztah:future_proof_prefix

Conversation

@thaJeztah
Copy link
Member

cli/command/container: stats: make stripping "/" prefix deterministic

This code was assuming the API always returns container names with
a "/" prefix. While this is currently correct, we may at some point
stop doing so.

This patch changes the code to only trim "/" as prefix and not any
other character.

cli/command/formatter: StripNamePrefix only strip "/" prefix

This code was assuming the API always returns container names with
a "/" prefix. While this is currently correct, we may at some point
stop doing so.

This patch changes the code to only trim "/" as prefix and not any
other character.

- Human readable description for the release notes

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

This code was assuming the API always returns container names with
a "/" prefix. While this is currently correct, we may at some point
stop doing so.

This patch changes the code to only trim "/" as prefix and not any
other character.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This code was assuming the API always returns container names with
a "/" prefix. While this is currently correct, we may at some point
stop doing so.

This patch changes the code to only trim "/" as prefix and not any
other character.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 29.3.1 milestone Mar 20, 2026
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Mar 20, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants