DockerCLI/cli
Sebastiaan van Stijn 258e27438f
context list: temporarily add ContextType to JSON output
Docker Desktop currently ships with the "cloud integration" wrapper,
which outputs an additional ContextType field in the JSON output.

While this field is non-standard, it made its way into Visual Studio's
Docker integration, which uses this to exclude "aci" and "eci" context
types that are not supported by Visual Studio.

This patch;

- conditionally adds a ContextType field to the JSON output
- but ONLY when using the default "{{json .}}" or "json" formats
  (which are the formats used by Visual Studio)
- if the context is a "aci" or "eci" context, that type is
  preserved, otherwise the default "moby" type is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fed9fa0f72)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-31 14:48:35 +02:00
..
command context list: temporarily add ContextType to JSON output 2024-05-31 14:48:35 +02:00
compose test/ Improve test coverage in volume.go 2024-03-20 19:53:33 +01:00
config cli-plugins: Introduce support for hooks 2024-03-22 17:30:18 +00:00
connhelper cli/connhelper/commandconn: inline variables 2024-02-10 13:59:36 +01:00
context add //go:build directives to prevent downgrading to go1.16 language 2023-12-14 15:03:46 +01:00
debug command: include default otel error handler for the cli 2024-04-03 12:01:28 -05:00
flags cli: move "config" flag to cli/flags/ClientOptions.InstallFlags() 2023-06-28 16:04:09 +02:00
hints login: Add message about using PATs 2023-08-03 10:35:04 +02:00
manifest linting: address assorted issues found by gocritic 2023-11-20 16:02:16 +01:00
registry/client migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
streams cli/streams: minor refactoring and docs touch-ups 2023-04-03 11:27:26 +02:00
trust golangci-lint: enable dupword linter 2023-11-20 16:02:18 +01:00
version Move versioning variables to a separate package. 2019-01-29 11:26:40 +00:00
winresources Use goversioninfo to create Windows Version Info 2021-10-11 16:54:22 +02:00
cobra.go chore: `docker help` should not show plugin vendor and version 2024-02-29 08:47:18 +01:00
cobra_test.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go format (GoDoc) comments with Go 1.19 to prepare for go updates 2022-07-19 19:10:16 +02:00
required_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00