Files
docker-cli/cli/command
Sebastiaan van Stijn bff56f0493 cli/command/system: define struct for formatting version
The client.ServerVersion method in the moby/client module defines
an output struct that's separate from the API response. These output
structs are not designed to be marshaled as JSON, but the CLI depended
on them defining `json` labels, which it used to format the output
as JSON (`docker version --format=json`); as a result, the JSON output
changed in docker v29, as it would now use the naming based on the Go
struct's fields (`APIVersion` instead of `ApiVersion`).

In future, we should consider having a `--raw` (or similar) option for
the CLI to print API responses as-is, instead of using client structs
or CLI structs for this (this would also make sure the JSON output does
not inherit client-side formatting of fields).

For now, let's create a struct for formatting the output, similar to what
we do for the client-side information.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-12 14:57:13 +01:00
..
2025-11-06 15:24:46 +01:00
2025-11-05 08:24:06 +01:00
2025-10-31 03:15:47 +01:00
2025-11-07 00:24:44 +01:00
2025-11-05 08:24:06 +01:00
2025-11-05 08:24:06 +01:00
2025-11-05 08:24:06 +01:00
2025-11-05 08:24:06 +01:00