compose/cmd
Nicolas De Loof 53198ab17a api: DownOptions.Images becomes a typed ImagePruneMode, validated upfront
The legal values of DownOptions.Images lived in pkg/compose
(image_pruner.go) while the field itself was a bare string in pkg/api,
and the only validation fired inside ImagesToPrune — after down had
already removed the project's containers, leaving the teardown half
done on a typo. The CLI validated its --rmi flag separately, so only
SDK callers were exposed.

ImagePruneMode and its three values now live in pkg/api next to the
field they constrain (type-aliased in pkg/compose for existing
consumers), down() rejects any other value before touching a single
resource, and the CLI check reuses the same definition. A unit test
runs Down with expectation-free mocks: one daemon call would fail it.

Epic #14074, B.6.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-06 11:31:22 +02:00
..
cmdtrace feat(tracing): surface otel shutdown errors via --debug 2026-09-02 17:12:12 +02:00
compatibility modernize some code 2026-02-12 15:31:35 +01:00
compose api: DownOptions.Images becomes a typed ImagePruneMode, validated upfront 2026-10-06 11:31:22 +02:00
display fix(display): reset the screen after degraded out-of-operation lines 2026-09-09 16:50:05 +02:00
formatter golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
prompt cmd/prompt: remove uses of github.com/AlecAivazis/survey/v2 2026-09-11 15:30:07 +02:00
main.go feat: add Docker Desktop Logs view hints and navigation shortcut 2026-04-10 15:26:08 +02:00