Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
This new field Named “Type” breaks VSCode extension for some strange …
Browse files Browse the repository at this point in the history
…reason, lets rename it ContextType

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
  • Loading branch information
gtardif committed Oct 30, 2020
1 parent 7cc3bc3 commit c3cc543
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cli/cmd/context/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func runList(cmd *cobra.Command, opts lsOpts) error {
}
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\n",
contextName,
c.Type,
c.ContextType,
c.Description,
c.DockerEndpoint,
c.KubernetesEndpoint,
Expand Down Expand Up @@ -144,7 +144,7 @@ type contextView struct {
Description string
DockerEndpoint string
KubernetesEndpoint string
Type string
ContextType string
Name string
StackOrchestrator string
}
Expand All @@ -158,7 +158,7 @@ func viewFromContextList(contextList []*store.DockerContext, currentContext stri
DockerEndpoint: getEndpoint("docker", c.Endpoints),
KubernetesEndpoint: getEndpoint("kubernetes", c.Endpoints),
Name: c.Name,
Type: c.Type(),
ContextType: c.Type(),
StackOrchestrator: c.Metadata.StackOrchestrator,
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/testdata/ls-out-json-windows.golden
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"}]
[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"}]
2 changes: 1 addition & 1 deletion tests/e2e/testdata/ls-out-json.golden
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"}]
[{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"}]
2 changes: 1 addition & 1 deletion tests/e2e/testdata/ls-out-legacy-json-windows.golden
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"}
{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"npipe:////./pipe/docker_engine","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"}
2 changes: 1 addition & 1 deletion tests/e2e/testdata/ls-out-legacy-json.golden
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","Type":"moby","Name":"default","StackOrchestrator":"swarm"}
{"Current":true,"Description":"Current DOCKER_HOST based configuration","DockerEndpoint":"unix:///var/run/docker.sock","KubernetesEndpoint":"","ContextType":"moby","Name":"default","StackOrchestrator":"swarm"}

0 comments on commit c3cc543

Please sign in to comment.