Skip to content

Commit c41c914

Browse files
committed
cli/command: remove WithContextEndpointType() as it's unused
This was added in 3126920, and modified in 520be05, but is not used anywhere. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 7770910 commit c41c914

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

cli/command/cli_options.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
package command
22

33
import (
4-
"fmt"
54
"io"
65
"os"
76
"strconv"
87

9-
"github.com/docker/cli/cli/context/docker"
10-
"github.com/docker/cli/cli/context/store"
118
"github.com/docker/cli/cli/streams"
129
"github.com/moby/term"
1310
)
@@ -82,19 +79,6 @@ func WithContentTrust(enabled bool) DockerCliOption {
8279
}
8380
}
8481

85-
// WithContextEndpointType add support for an additional typed endpoint in the context store
86-
// Plugins should use this to store additional endpoints configuration in the context store
87-
func WithContextEndpointType(endpointName string, endpointType store.TypeGetter) DockerCliOption {
88-
return func(cli *DockerCli) error {
89-
switch endpointName {
90-
case docker.DockerEndpoint:
91-
return fmt.Errorf("cannot change %q endpoint type", endpointName)
92-
}
93-
cli.contextStoreConfig.SetEndpoint(endpointName, endpointType)
94-
return nil
95-
}
96-
}
97-
9882
// WithDefaultContextStoreConfig configures the cli to use the default context store configuration.
9983
func WithDefaultContextStoreConfig() DockerCliOption {
10084
return func(cli *DockerCli) error {

0 commit comments

Comments
 (0)